diff --git a/run_once_20-install-user-packages.sh.tmpl b/run_once_20-install-user-packages.sh.tmpl index 909ff2f..f56b823 100755 --- a/run_once_20-install-user-packages.sh.tmpl +++ b/run_once_20-install-user-packages.sh.tmpl @@ -12,6 +12,12 @@ # ============================================================================= set -euo pipefail +# Make user-local bins (bun, omp, cargo) visible to the script even when +# invoked from a non-interactive context (e.g. `chezmoi apply` over SSH). +# These are normally added by .zshrc, but this script runs in a plain +# shell where those rc files aren't sourced. +export PATH="$HOME/.local/bin:$HOME/.bun/bin:$HOME/.cargo/bin:$PATH" + log() { printf '\033[1;34m[packages]\033[0m %s\n' "$*"; } die() { printf '\033[1;31m[packages ERROR]\033[0m %s\n' "$*" >&2; exit 1; }