Skip to content

Commit b955c44

Browse files
betegonclaude
andcommitted
fix(install): handle spaces in home directory paths
Use bash arrays instead of space-separated strings for config file paths. This prevents word splitting that would break paths like /Users/Jane Doe/.zshrc into invalid fragments. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 292c815 commit b955c44

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/public/install

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,25 +117,25 @@ XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
117117
current_shell=$(basename "$SHELL")
118118
case $current_shell in
119119
fish)
120-
config_files="$HOME/.config/fish/config.fish"
120+
config_files=("$HOME/.config/fish/config.fish")
121121
;;
122122
zsh)
123-
config_files="$HOME/.zshrc $HOME/.zshenv $XDG_CONFIG_HOME/zsh/.zshrc $XDG_CONFIG_HOME/zsh/.zshenv"
123+
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/.bashrc" "$HOME/.bash_profile" "$HOME/.profile" "$XDG_CONFIG_HOME/bash/.bashrc" "$XDG_CONFIG_HOME/bash/.bash_profile")
127127
;;
128128
ash|sh)
129-
config_files="$HOME/.ashrc $HOME/.profile /etc/profile"
129+
config_files=("$HOME/.ashrc" "$HOME/.profile" "/etc/profile")
130130
;;
131131
*)
132-
config_files="$HOME/.bashrc $HOME/.bash_profile $HOME/.profile"
132+
config_files=("$HOME/.bashrc" "$HOME/.bash_profile" "$HOME/.profile")
133133
;;
134134
esac
135135

136136
if [[ "$no_modify_path" != "true" ]]; then
137137
config_file=""
138-
for file in $config_files; do
138+
for file in "${config_files[@]}"; do
139139
if [[ -f $file ]]; then
140140
config_file=$file
141141
break

0 commit comments

Comments
 (0)