{"record":{"id":"937e62747919119a","repo":"gitbutlerapp/gitbutler","slug":"err","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/but-installer/src/shell.rs","lineNumber":215,"sourceCode":"        ui::println_empty();\n        info(&format!(\n            \"Detected {} config file: '{}'\",\n            cfg.shell.name(),\n            cfg.config_path.display()\n        ));\n\n        let mut missing = Vec::new();\n        if !cfg.has_path {\n            missing.push(\"PATH setup\");\n        }\n        if !cfg.has_completions {\n            missing.push(\"shell completions\");\n        }\n        info(&format!(\"Config file lacks: {}\", missing.join(\", \")));\n\n        if ui::prompt_for_confirmation(\"Automatically add missing config?\") {\n            if let Err(err) = cfg.setup_config() {\n                warn(&format!(\"{err}\"));\n                warn(&format!(\n                    \"Failed to add shell configuration for {}, skipping...\",\n                    cfg.shell.name()\n                ));\n            }\n        } else {\n            info(&format!(\n                \"Skipping auto-configuration for {}\",\n                cfg.shell.name()\n            ));\n            info(&format!(\n                \"For manual setup, add the following to '{}'\",\n                cfg.config_path.display(),\n            ));\n            ui::println_empty();\n            for line in cfg.generate_missing_shell_config_lines() {\n                ui::println(&format!(\"  {line}\"));\n            }","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-installer/src/shell.rs#L197-L233","documentation":"configure_shell detects that the shell's config file is missing required entries and offers to add them automatically. If the user confirms and cfg.setup_config() fails, the underlying error is logged as a warning with format!(\"{err}\"). This message is the propagated error text from setup_config, surfaced as a warning rather than aborting the installation.","triggerScenarios":"Raised in configure_shell (called from run_installation_impl) when setup_config cannot modify the shell config file — typically permission problems, an unreadable/unparsable rc file, or an unsupported shell.","commonSituations":"rc file owned by root or read-only; dotfiles managed by a dotfile manager (chezmoi, stow, GNU stow symlinks to a read-only store); non-standard SHELL env var pointing at an unsupported shell; disk full.","solutions":["Read the logged {err} message to see the underlying cause (permissions, parse failure, unsupported shell).","Add the required completion/env lines to your shell config manually, as documented by the installer output.","Fix file permissions (chown/chmod +w) on the rc file and re-run the installer, choosing 'yes' at the prompt.","Check whether the rc file is a symlink into a managed dotfiles store and update the source file instead."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Check the shell rc file is writable before letting the installer modify it\nimport os\ndef rc_writable(rc_path):\n    return os.path.exists(rc_path) and os.access(rc_path, os.W_OK) or os.access(os.path.dirname(rc_path), os.W_OK)","typeGuard":null,"tryCatchPattern":"// Downgrade config write failure to a warning with manual instructions\nif let Err(err) = cfg.setup_config() {\n    warn(&format!(\"{err}\"));\n    warn(\"add the lines manually to your rc file, then re-source it\");\n}","preventionTips":["Ensure your rc file is writable and not root-owned before installing","Unmanage the rc file from dotfile managers (or symlink-writable sources) during installs","Know which shell config file your shell actually reads ($SHELL vs $0)"],"tags":["shell","installer","config","permissions"],"backgroundTag":"file-write-permission-denied","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}