Enabling unknown-options-as-args seems to short-circuit the code that would set notFlags to the remaining arguments after checking if halt-at-non-option is enabled:
|
if (arg !== '--' && isUnknownOptionAsArg(arg)) { |
|
pushPositional(arg) |
I see several instances where isUnknownOptionAsArg is guarded with a basic check for /^-/.test(arg). Would it be naive to suggest that updating the condition to arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg) should fix it?
Enabling
unknown-options-as-argsseems to short-circuit the code that would setnotFlagsto the remaining arguments after checking ifhalt-at-non-optionis enabled:yargs-parser/lib/yargs-parser.ts
Lines 225 to 226 in 0fdbfa1
I see several instances where
isUnknownOptionAsArgis guarded with a basic check for/^-/.test(arg). Would it be naive to suggest that updating the condition toarg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)should fix it?