Skip to content

Commit 91e5d90

Browse files
authored
test/e2e: Preserve the existing environment when using exec.Command (#2876)
Signed-off-by: timflannagan <[email protected]> Signed-off-by: timflannagan <[email protected]>
1 parent a8edd5c commit 91e5d90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: test/e2e/ctx/ctx.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (ctx TestContext) DumpNamespaceArtifacts(namespace string) error {
130130
}
131131

132132
cmd := exec.Command(ctx.artifactsScriptPath)
133-
cmd.Env = append(cmd.Env, envvars...)
133+
cmd.Env = append(os.Environ(), envvars...)
134134
cmd.Stdout = os.Stdout
135135
cmd.Stderr = os.Stderr
136136
if err := cmd.Run(); err != nil {

0 commit comments

Comments
 (0)