[BUG] CLI command dont fail when provided with invalid options #6638
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 9.x
work is associated with a specific npm 9 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When running
npm explain --omit=dev
for example, you get no error that the--omit
isn't a valid option for this command.This can cause a lot of frustrations when you get unexpected results.
Expected Behavior
I would expect npm to error with a non 0 exit code, before running the logic of the command itself, telling me i made an error and used an unsuported option.
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: