{"record":{"id":"25b5cb29cd19888e","repo":"gitbutlerapp/gitbutler","slug":"failed-to-add-shell-configuration-for-skipping","errorCode":null,"errorMessage":"Failed to add shell configuration for {}, skipping...","messagePattern":"Failed to add shell configuration for (.+?), skipping\\.\\.\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/but-installer/src/shell.rs","lineNumber":216,"sourceCode":"        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            }\n        }","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-installer/src/shell.rs#L198-L234","documentation":"Companion warning to the setup_config failure: after logging the underlying error, configure_shell warns 'Failed to add shell configuration for <shell>, skipping...' and continues installation without shell integration. The install still succeeds; completions/PATH setup for that shell are skipped.","triggerScenarios":"Raised in configure_shell (run_installation_impl) when the user accepted automatic config but cfg.setup_config() returned Err, for any of cfg.shell.name()'s shells — permission denied on the rc file, unknown/unparseable shell, or write failure.","commonSituations":"Same as the underlying failure: read-only or root-owned rc files, dotfile-manager-managed configs, unsupported shells like fish/nushell lacking a template, sandboxed installers.","solutions":["Treat it as non-fatal: complete the install, then add the completions/PATH lines to your rc file by hand.","Re-run the installer after fixing rc file permissions.","Verify your shell is supported (check cfg.shell.name() in output); use a supported shell or file a feature request.","Use --dry-run/verbose output to see exactly which lines would have been added."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# Pre-check that the installer's target rc file exists and is writable\nimport os, shlex\nshell = os.environ.get('SHELL', '')\nrc = os.path.expanduser({'bash': '~/.bashrc', 'zsh': '~/.zshrc'}.get(os.path.basename(shell), ''))\nok = bool(rc) and (not os.path.exists(rc) or os.access(rc, os.W_OK))","typeGuard":null,"tryCatchPattern":"// Accept the skip and finish the manual step\nmatch cfg.setup_config() {\n    Ok(_) => info(\"shell config updated\"),\n    Err(err) => { warn(\"{err}; skipping — add completions manually\"); }\n}","preventionTips":["Prefer answering 'no' at the auto-config prompt if your dotfiles are read-only/managed, then add lines manually","Verify shell support (bash/zsh) before running automatic configuration","Back up your rc file before any installer touches it"],"tags":["shell","installer","config","nonfatal"],"backgroundTag":"file-write-failed","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"}