diff --git a/scripts/install.sh b/scripts/install.sh index ad53a1709e25..c8cefabe68fd 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1762,8 +1762,7 @@ fix_npm_permissions() { npm config set prefix "$HOME/.npm-global" ui_warn "Avoid sudo npm i -g for future OpenClaw updates; use npm i -g openclaw@latest so npm keeps using this user prefix instead of a different global prefix." - # shellcheck disable=SC2016 - persist_shell_path_prepend "$HOME/.npm-global/bin" '$HOME/.npm-global/bin' || true + persist_shell_path_prepend "$HOME/.npm-global/bin" "\$HOME/.npm-global/bin" || true export PATH="$HOME/.npm-global/bin:$PATH" ui_success "npm configured for user installs" @@ -1917,8 +1916,7 @@ ensure_user_local_bin_on_path() { export PATH="$target:$PATH" - # shellcheck disable=SC2016 - local path_line='export PATH="$HOME/.local/bin:$PATH"' + local path_line="export PATH=\"\$HOME/.local/bin:\$PATH\"" for rc in "$HOME/.bashrc" "$HOME/.zshrc"; do if [[ -f "$rc" ]] && ! grep -q ".local/bin" "$rc"; then echo "$path_line" >> "$rc"