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?