narn icon indicating copy to clipboard operation
narn copied to clipboard

`narn <binary>` incorrectly runs `pnpm run <binary>`

Open bbugh opened this issue 1 year ago • 1 comments

pnpm can run both scripts and binaries like yarn 'pnpm eslint' == 'yarn eslint' && 'pnpm test' == 'yarn test'.

When running narn eslint in a pnpm folder, it runs pnpm run.

The most correct form is pnpm exec <binary>, but pnpm lets you do it if there's no script name binary, same as yarn.

Example:

» pnpm eslint . --fix # Works fine

» narn eslint . --fix
pnpm run eslint . --fix # Incorrectly calls run
 ERR_PNPM_NO_SCRIPT  Missing script: eslint

bbugh avatar Oct 07 '22 13:10 bbugh

@joeldenning would you accept a PR for this?

bbugh avatar Oct 19 '22 14:10 bbugh