Skip to content

Commit

Permalink
Instead of overriding the env variables add them to the environment.
Browse files Browse the repository at this point in the history
Before this change if needed to pass additional env variable to the
ginkgo tester it would remove other variables. With this change it adds
variables specified in the commandline.
  • Loading branch information
jbtk committed May 9, 2024
1 parent 0d7ca9c commit 225b6ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/testers/ginkgo/ginkgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ func (t *Tester) Test() error {

klog.V(0).Infof("Running ginkgo test as %s %+v", t.ginkgoPath, ginkgoArgs)
cmd := exec.Command(t.ginkgoPath, ginkgoArgs...)
cmd.SetEnv(t.Env...)
env := os.Environ()
env = append(env, t.Env...)
cmd.SetEnv(env...)
exec.InheritOutput(cmd)
return cmd.Run()
}
Expand Down

0 comments on commit 225b6ae

Please sign in to comment.