Skip to content

Commit

Permalink
Fix: stop ignoring --config-file cypress option
Browse files Browse the repository at this point in the history
Since we always call `removeArg(rawArgs, 'config')`, and since the `matchRE` matches `--config` as well as `--config-file`, we end up ignoring the `--config-file` option if it is provided without the "=" (`--config-file my-config.json`).
This commit fixes this by ensuring that calling `removeArg('config')` removes `--config` without removing `--config-file`.
  • Loading branch information
ahderman committed Jun 13, 2020
1 parent 78374b7 commit 8f1a87c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-e2e-cypress/index.js
Expand Up @@ -53,7 +53,7 @@ module.exports.defaultModes = {
}

function removeArg (rawArgs, argToRemove, offset = 1) {
const matchRE = new RegExp(`^--${argToRemove}`)
const matchRE = new RegExp(`^--${argToRemove}$`)
const equalRE = new RegExp(`^--${argToRemove}=`)
const i = rawArgs.findIndex(arg => matchRE.test(arg))
if (i > -1) {
Expand Down

0 comments on commit 8f1a87c

Please sign in to comment.