Skip to content

Commit

Permalink
fix(halt-at-non-option): prevent known args from being parsed when "u…
Browse files Browse the repository at this point in the history
…nknown-options-as-args" is enabled
  • Loading branch information
kherock committed Mar 26, 2022
1 parent ba1fcfc commit 5ac4d82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/yargs-parser.ts
Expand Up @@ -222,7 +222,7 @@ export class YargsParser {
let value: string

// any unknown option (except for end-of-options, "--")
if (arg !== '--' && isUnknownOptionAsArg(arg)) {
if (arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
pushPositional(arg)
// ---, ---=, ----, etc,
} else if (truncatedArg.match(/---+(=|$)/)) {
Expand Down

0 comments on commit 5ac4d82

Please sign in to comment.