mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
fix(install): add zprofile fallback and create zshrc on fresh macOS installs (#2320)
On macOS, zsh users may not have ~/.zshrc if they haven't customized their shell yet. The installer would silently fail to add ~/.local/bin to PATH, causing 'hermes: command not found' after installation. - Check ~/.zprofile as fallback for zsh users (macOS login shell config) - Create ~/.zshrc if neither config file exists Cherry-picked from PR #2315 by erhnysr. Co-authored-by: erhnysr <erhnysr@users.noreply.github.com>
This commit is contained in:
parent
a03cbcd5f9
commit
06f4df52f1
1 changed files with 6 additions and 0 deletions
|
|
@ -772,6 +772,12 @@ setup_path() {
|
|||
case "$LOGIN_SHELL" in
|
||||
zsh)
|
||||
[ -f "$HOME/.zshrc" ] && SHELL_CONFIGS+=("$HOME/.zshrc")
|
||||
[ -f "$HOME/.zprofile" ] && SHELL_CONFIGS+=("$HOME/.zprofile")
|
||||
# If neither exists, create ~/.zshrc (common on fresh macOS installs)
|
||||
if [ ${#SHELL_CONFIGS[@]} -eq 0 ]; then
|
||||
touch "$HOME/.zshrc"
|
||||
SHELL_CONFIGS+=("$HOME/.zshrc")
|
||||
fi
|
||||
;;
|
||||
bash)
|
||||
[ -f "$HOME/.bashrc" ] && SHELL_CONFIGS+=("$HOME/.bashrc")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue