-
Notifications
You must be signed in to change notification settings - Fork 4
Add support for Environment vars in RunConfig #23
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
The functionality previously existed, but was untested.
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.
That was fast ^^
I have only one comment below.
Also: there's a typo in the second commit message: "Enviornment"
def withAdditionalEnv(additionalEnv: Map[String, String]): RunConfig = | ||
copy(additionalEnv = additionalEnv) |
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.
I find it confusing that this method is called withAdditionalEnv, but it sets instead of adding. It's even more confusing that the method below actually adds to the map.
Have you considered calling it env
instead of additionalEnv
, hence this method would be withEnv
, and the one below would remain withAdditionalEnv
?
I understand the env here is in addition to the ExternalJSRun.Config.env
. But that one is anyway already in addition to the host process environment vars. It doesn't seem problematic to me to keep env
at each level.
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.
I have renamed it to env
and removed the helper. While it might be convenient every once in a while, it is likely that at the call-site, the env is just forwarded anyways.
So it is definitely not worth the confusion.
This is the first step towards scala-js/scala-js#4686.
Is there anything else we should do here, or should I publish a new version now? |
I think the next step is to publish a new version indeed. |
This is the first step towards scala-js/scala-js#4686.