Skip to content

Conversation

ahderman
Copy link
Contributor

@ahderman ahderman commented Jun 13, 2020

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 (e.g. --config-file my-config.json).

This commit fixes this by ensuring that calling removeArg('config') removes --config without removing --config-file.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the failing test.

This fixes an issue with the implementation of `removeArg()` whereby
calling `removeArg(args, "config")` removed argument "--config-file" if
provided

This commit fixes this by ensuring that calling `removeArg(args, "config")`
removes `--config` without removing `--config-file`.
@ahderman
Copy link
Contributor Author

ahderman commented Jun 20, 2020

@sodatea Test fixed

Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@haoqunjiang haoqunjiang merged commit 5869f1f into vuejs:dev Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants