You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I pass this to parseArgs() (using 'import parseArgs from 'minimist';' in an ES6 module'):
[ 'test/TopMenuShort.starbucks' ]
For example, my command line is node myscript.js test/TopMenuShort.starbucks, my "unknown" function is called, and this is output (though I've realized that this line is printed by my "unknown" function):
My work around is to simply return true from my "unknown" function, but that still has the problem that I can't just print the "unknown option" error message. I'm pretty sure that the function should only be called for unknown options, not for non-options on the command line.
The text was updated successfully, but these errors were encountered:
Original issue by @johndeighan at https://github.com/substack/minimist/issues/161
when I pass this to parseArgs() (using 'import parseArgs from 'minimist';' in an ES6 module'):
[ 'test/TopMenuShort.starbucks' ]
For example, my command line is
node myscript.js test/TopMenuShort.starbucks
, my "unknown" function is called, and this is output (though I've realized that this line is printed by my "unknown" function):Unknown option: -test/TopMenuShort.starbucks
But the return value from parseArgs() is correct:
My work around is to simply return true from my "unknown" function, but that still has the problem that I can't just print the "unknown option" error message. I'm pretty sure that the function should only be called for unknown options, not for non-options on the command line.
The text was updated successfully, but these errors were encountered: