-
-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve parsing of --env
flag
#2643
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2643 +/- ##
==========================================
+ Coverage 95.19% 95.21% +0.02%
==========================================
Files 30 30
Lines 1498 1505 +7
Branches 429 430 +1
==========================================
+ Hits 1426 1433 +7
Misses 72 72
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Yup, good catch. One more thing we can do is to introduce some special character for empty string like we do in parser grammars. |
@@ -373,6 +373,11 @@ class WebpackCLI { | |||
{ | |||
name: 'env', | |||
type: (value, previous = {}) => { | |||
// for https://github.com/webpack/webpack-cli/issues/2642 | |||
if (value.endsWith('=')) { | |||
value.concat('""'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something weird with coverage here
@alexander-akait Thanks for your update. I labeled the Pull Request so reviewers will review it again. @anshumanv Please review the new changes. |
Added more tests + fix edge cases with |
After CI will be green I want to merge it, because we need finish #2632 and when finish testing on webpack-dev-server@4, after this we need do release (and webpack-dev-server release too) |
What kind of change does this PR introduce?
bugfix
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
will add an example in webpack.js.org after merge.
Summary
Fixes #2642
Does this PR introduce a breaking change?
Maybe
Other information
No