Add user-local bin dirs to PATH in run_once_20
The script runs from a non-interactive context (chezmoi apply over SSH) where .zshrc isn't sourced. bun installs to ~/.bun/bin and omp/cargo to ~/.local/bin / ~/.cargo/bin, none of which are on the script's default PATH. Add them at the top so the post-install 'omp --version' and 'command -v omp' checks work. Fixes the spurious 'omp: command not found' right after a successful bun add -g on boxes where omp is freshly installed.
This commit is contained in:
parent
5e7fd61f02
commit
36091d458b
1 changed files with 6 additions and 0 deletions
|
|
@ -12,6 +12,12 @@
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
set -euo pipefail
|
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' "$*"; }
|
log() { printf '\033[1;34m[packages]\033[0m %s\n' "$*"; }
|
||||||
die() { printf '\033[1;31m[packages ERROR]\033[0m %s\n' "$*" >&2; exit 1; }
|
die() { printf '\033[1;31m[packages ERROR]\033[0m %s\n' "$*" >&2; exit 1; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue