pnpm install --foo # equivalent to `pnpm install`
failure with unknown argument foo
silence
FYI, this is how npm behaves as well. Although might be good to have strict validation
I'd like to look into this issue. @zkochan can you elaborate on what you mean by, 'strict validation'?
I mean, if there is an unknown flag, pnpm could fail with an error. Though this would be a breaking change, so for now, we could maybe just print warnings.
Parsing of flags is done by nopt here: https://github.com/pnpm/pnpm/blob/master/src/main.ts#L145
Printing the warning should be done via @pnpm/logger. logger.warn('....'). You can find examples of warnings in code
@etamponi this is the issue I mentioned today when you mistyped --side-effects-cache.
this seems to be solved at first glance - or is something missing?
$ pnpm install --foo
 ERROR  Unknown option 'foo'
For help, run: pnpm help recursive
Yes, this was done.
Most helpful comment
I mean, if there is an unknown flag, pnpm could fail with an error. Though this would be a breaking change, so for now, we could maybe just print warnings.
Parsing of flags is done by nopt here: https://github.com/pnpm/pnpm/blob/master/src/main.ts#L145
Printing the warning should be done via
@pnpm/logger.logger.warn('....'). You can find examples of warnings in code@etamponi this is the issue I mentioned today when you mistyped
--side-effects-cache.