Skip to content

Commit ae25386

Browse files
betegonclaude
andcommitted
fix(install): prioritize .bash_profile over .bashrc on macOS
- Reorder bash config_files to check .bash_profile first since macOS Terminal.app runs login shells which source .bash_profile, not .bashrc - Use XDG_CONFIG_HOME for fish config instead of hardcoded path - Show manual PATH instructions when --no-modify-path is used Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d41f741 commit ae25386

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

docs/public/install

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,19 @@ XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
117117
current_shell=$(basename "${SHELL:-sh}")
118118
case $current_shell in
119119
fish)
120-
config_files=("$HOME/.config/fish/config.fish")
120+
config_files=("$XDG_CONFIG_HOME/fish/config.fish")
121121
;;
122122
zsh)
123123
config_files=("$HOME/.zshrc" "$HOME/.zshenv" "$XDG_CONFIG_HOME/zsh/.zshrc" "$XDG_CONFIG_HOME/zsh/.zshenv")
124124
;;
125125
bash)
126-
config_files=("$HOME/.bashrc" "$HOME/.bash_profile" "$HOME/.profile" "$XDG_CONFIG_HOME/bash/.bashrc" "$XDG_CONFIG_HOME/bash/.bash_profile")
126+
config_files=("$HOME/.bash_profile" "$HOME/.bashrc" "$HOME/.profile" "$XDG_CONFIG_HOME/bash/.bash_profile" "$XDG_CONFIG_HOME/bash/.bashrc")
127127
;;
128128
ash|sh)
129129
config_files=("$HOME/.profile" "/etc/profile")
130130
;;
131131
*)
132-
config_files=("$HOME/.bashrc" "$HOME/.bash_profile" "$HOME/.profile")
132+
config_files=("$HOME/.bash_profile" "$HOME/.bashrc" "$HOME/.profile")
133133
;;
134134
esac
135135

@@ -162,6 +162,16 @@ if [[ "$no_modify_path" != "true" ]]; then
162162
;;
163163
esac
164164
fi
165+
else
166+
echo -e "${MUTED}Skipping PATH modification. Manually add to your shell config:${NC}"
167+
case $current_shell in
168+
fish)
169+
echo " fish_add_path \"$install_dir\""
170+
;;
171+
*)
172+
echo " export PATH=\"$install_dir\":\$PATH"
173+
;;
174+
esac
165175
fi
166176

167177
if [[ -n "${GITHUB_ACTIONS:-}" ]] && [[ "${GITHUB_ACTIONS}" == "true" ]] && [[ -n "${GITHUB_PATH:-}" ]]; then

0 commit comments

Comments
 (0)