Last 12 weeks · 13 commits
3 of 6 standards met
Summary Any CLI built with fails with , even when no positional argument was actually passed — as long as Node.js is reached through a symlink or junction (e.g. Scoop's "current" version pointer on Windows, or nvm/fnm/volta depending on their setup). Environment (latest published at the time of this report) Node.js installed via a version manager that exposes a "current" pointer as a symlink/junction rather than a plain directory Reproduced identically under Git Bash and PowerShell — shell-independent Root cause In , the filter that is supposed to strip the node executable and the script path out of the real arguments: is resolved through before the comparison, but never is. When Node is invoked through a symlink/junction that the OS does not resolve at process start, stays the unresolved path while (for that very same , i.e. ) returns the real target — so the two are never equal, and the executable's path survives the filter and gets treated as an unexpected positional argument. Minimal reproduction Output on a machine with an active Scoop "current" symlink: Suggested fix Resolve once, the same way already is: Impact Affects every package that depends on (in my case, ) for anyone using a symlink/junction-based Node version manager instead of a directly-installed binary.
Repository: ljharb/pargs. Description: a useful wrapper for `util.parseArgs` Stars: 7, Forks: 0. Primary language: JavaScript. Languages: JavaScript (95.5%), TypeScript (4.5%). Topics: argument-parser, parseargs, util. Open PRs: 0, open issues: 1. Last activity: 2mo ago. Community health: 71%. Top contributors: ljharb, ibakaidov.