Skip to content

Commit

Permalink
fix: turn off yargs strict check for compatible(as a quick workaround)
Browse files Browse the repository at this point in the history
  • Loading branch information
rocwind committed Aug 20, 2021
1 parent d145744 commit 38827d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/command-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ function addCommonConfiguration(yargs: yargs.Argv): void {
yargs
.wrap(/*columnLimit*/ null)
.string('_') // Interpret non-hyphenated arguments as strings (e.g. an app version of '1.10').
.strict() // Validate hyphenated (named) arguments.
// TODO: fix this
// .strict() // Validate hyphenated (named) arguments.
.fail((msg: string) => showHelp()); // Suppress the default error message.
}

Expand Down Expand Up @@ -1116,7 +1117,8 @@ var argv = yargs
.alias('v', 'version')
.version(packageJson.version)
.wrap(/*columnLimit*/ null)
.strict() // Validate hyphenated (named) arguments.
// TODO: fix this
// .strict() // Validate hyphenated (named) arguments.
.check((argv: any, aliases: { [aliases: string]: string }): any => isValidCommandCategory) // Report unrecognized, non-hyphenated command category.
.fail((msg: string) => showHelp(/*showRootDescription*/ true))
.parseSync(); // Suppress the default error message.
Expand Down

0 comments on commit 38827d4

Please sign in to comment.