-
Notifications
You must be signed in to change notification settings - Fork 207
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
[node-bootstrapper] set ENV variables without intermediate template step #5176
Conversation
Didn't look into cmd can set env before executing. This way is definitely better. Thanks for doing this. |
@@ -538,13 +501,13 @@ func getNBCInstance(jsonFilePath string) *nbcontractv1.Configuration { | |||
return nBCB.GetNodeBootstrapConfig() | |||
} | |||
|
|||
func generateTestDataIfRequested(t *testing.T, folder, cseCmd string) { | |||
func generateTestDataIfRequested(t *testing.T, folder string, cmd *exec.Cmd) { | |||
if os.Getenv("GENERATE_TEST_DATA") == "true" { |
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.
Just seeing this so asking, though it's not part of this PR.
Where is this env var set? ADO pipeline?
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.
idk. It looks weird for me. I would delete it.
Remove the intermediate template step when setting environment variables in the
node-bootstrapper
package.Type-safety is lost during templating.
This should reduce number of changes required to modify ENV variables and eliminate errors when a function string reference isn't updated after a code change (introduce type-safety).
It also moves us 1 step closer to shell script removal.