codeburn/mac/Sources/CodeBurnMenubar/Security
Yishun Tang · CrazyAnt 87a01c25f5 fix(mac): prefer the node beside the CLI over a version manager's default
The app built PATH by appending its curated directories after the
inherited value, so whichever `node` came first won -- on an nvm machine
that is the default alias, which can be an older major than the one the
CLI was installed under. Every spawn then died on the engine gate
("codeburn requires Node.js >= 22.13.0 (current: v20.20.2)") and the
popover showed "Could not load Today" with nothing pointing at Node.

augmentedPath now takes the resolved CLI path and, when an executable
node sits in the same directory, moves that directory to the front of
PATH -- promoting it if already present, dropping nothing. That
interpreter is the one that installed the CLI and satisfies its engine
range. A bare `codeburn` or a CLI with no sibling node leaves the
inherited order untouched, so #1263's Nix layout is unaffected.

makeProcess resolved the CLI twice, once for PATH and once for argv; it
now resolves once and passes the same value to both.

Three tests cover the reorder, the promote-not-duplicate case, and the
untouched case; removing only the reorder block makes the first two fail
with the reported shape while every pre-existing test still passes.
2026-09-07 10:16:48 +08:00
..
CodeburnCLI.swift fix(mac): prefer the node beside the CLI over a version manager's default 2026-09-07 10:16:48 +08:00
KeychainCredentialCache.swift polish(menubar): pane-named window title, single tagline, version dedupe, em-dash sweep 2026-08-24 09:48:16 -07:00
PreferredTerminal.swift feat(menubar): add preferred terminal setting with Terminal.app fallback 2026-08-04 00:19:00 +03:00
SafeFile.swift docs(menubar): state what the Keychain move actually guarantees 2026-08-19 11:43:44 -07:00
TerminalLauncher.swift feat(menubar): add preferred terminal setting with Terminal.app fallback 2026-08-04 00:19:00 +03:00