2 Commits

Author SHA1 Message Date
can1357 7b0780028f style(scripts): quoted the empty CDPATH assignment in link-omp.sh
`CDPATH=` already cleared the variable for the `cd` subshell, so this is
a readability-only change: `CDPATH=''` is the identical POSIX assignment
written with explicit empty quotes. No behavior change, and there was no
CDPATH leak to fix.
2026-07-28 10:22:57 +02:00
roboomp db9d9f3f59 fix(setup): harden global omp symlink against bun pm -g bin failure
The root `setup` script used `ln -sfn ... "$(bun pm -g bin)/omp"`. On
fresh hosts where `$HOME/.bun/install/global/package.json` is missing
`bun pm -g bin` aborts with "No package.json was found", the command
substitution expands to empty, and `ln` tries to write `/omp` —
failing with `Permission denied` (or, on a writable filesystem,
silently linking under `/`).

Move the logic into `scripts/link-omp.sh`:

- Capture `bun pm -g bin` and ignore its failure.
- Fall back to `${BUN_INSTALL:-$HOME/.bun}/bin`, matching Bun's own
  install convention.
- `mkdir -p` the target so the link works even when nothing has yet
  populated the global bin dir.

Fixes #3701
2026-06-28 04:27:03 +00:00