From 06f4df52f16a80ad2e4870eb39d22a504f73be8e Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sat, 21 Mar 2026 07:30:43 -0700 Subject: [PATCH] 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 --- scripts/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index d4edf2e11..b6dc34d9c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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")