mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-24 09:29:35 -05:00
update cli to work with latest commander.js
This commit is contained in:
+3
-3
@@ -51,9 +51,9 @@ const spaceDelimitedArgsMsg = (flag, args) => {
|
||||
}
|
||||
|
||||
const parseVariableOpts = (fnArgs, args) => {
|
||||
const opts = fnArgs.pop()
|
||||
const [opts, unknownArgs] = fnArgs
|
||||
|
||||
if (fnArgs.length && (opts.spec || opts.tag)) {
|
||||
if ((unknownArgs && unknownArgs.length) && (opts.spec || opts.tag)) {
|
||||
// this will capture space-delimited args after
|
||||
// flags that could have possible multiple args
|
||||
// but before the next option
|
||||
@@ -72,7 +72,7 @@ const parseVariableOpts = (fnArgs, args) => {
|
||||
const endIndex = nextOptOffset !== -1 ? argIndex + nextOptOffset : args.length
|
||||
|
||||
const maybeArgs = _.slice(args, argIndex, endIndex)
|
||||
const extraArgs = _.intersection(maybeArgs, fnArgs)
|
||||
const extraArgs = _.intersection(maybeArgs, unknownArgs)
|
||||
|
||||
if (extraArgs.length) {
|
||||
opts[flag] = [opts[flag]].concat(extraArgs)
|
||||
|
||||
Reference in New Issue
Block a user