From 8f1a87c016c1c7b7cc26cf23b0cc832f7461194c Mon Sep 17 00:00:00 2001 From: Alexandre D'Erman Date: Sat, 13 Jun 2020 17:22:00 +0200 Subject: [PATCH] Fix: stop ignoring --config-file cypress option 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`. --- packages/@vue/cli-plugin-e2e-cypress/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vue/cli-plugin-e2e-cypress/index.js b/packages/@vue/cli-plugin-e2e-cypress/index.js index f567262a36..ee02250b37 100644 --- a/packages/@vue/cli-plugin-e2e-cypress/index.js +++ b/packages/@vue/cli-plugin-e2e-cypress/index.js @@ -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) {