-
Notifications
You must be signed in to change notification settings - Fork 81
fix: pass config object to devCommand step handler #6095
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
Conversation
ba749f0 to
e466c3c
Compare
|
This pull request adds or modifies JavaScript ( |
|
This pull request adds or modifies JavaScript ( |
e466c3c to
2f6e355
Compare
|
This pull request adds or modifies JavaScript ( |
mrstork
left a comment
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.
Looks okay to me!
🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes WRFL-2278
When plugins overrides the ENV via writing into
args[0].netlifyConfig.build.environment, this new value is being applied to the environment.But later on, the
netlify cli, when it starts the dev server, it never passes this changed env var into itHere is the dev Command
https://github.com/netlify/cli/blob/main/src/utils/run-build.ts#L90
startFrameworkServerpassessettings, which hasenvbut it's typically empty.So, if I'm having a plugin which does change the env, it is never got into the user app.
To fix this, I'm just providing the arguments into the
devCommandcall, so then the place-of-usage (in this case - netlify-cli) can use it like that:Appropriate PR in CLI which supposed to use this PR - netlify/cli#7045
For us to review and ship your PR efficiently, please perform the following steps:
we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
something that`s on fire 🔥 (e.g. incident related), you can skip this step.
your code follows our style guide and passes our tests.
A picture of a cute animal (not mandatory, but encouraged)