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 Jul 18, 2022
1 parent 5f149be commit 4ff1b25
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 4ff1b25

Please sign in to comment.