Files
ECC/scripts/lib
Nguyen Thanh Dat e3c1437317 fix(dev-command): an unknown option must not swallow the script name
npm accepts any config key as `--key value`, so listing the value-taking
options can never be complete. `npm --userconfig /tmp/npmrc run dev` read the
script name as `/tmp/npmrc`, and the dev server started outside tmux.

Collect every candidate token after the manager word instead of only the
first, keeping the known value-taking options (so `--workspace dev` still
means a workspace named dev, not the dev script) and the `--` stop. An unknown
option's value now gets scanned too: that costs a false positive only when a
config value is literally `dev`, and a refusal the user sees beats a guard
that silently did nothing.

The auto-tmux tests now gate on tmux availability like their neighbours —
without tmux the hook passes the command through by design — and assert the
hook's exit code before parsing its stdout.
2026-08-24 11:17:21 +07:00
..