Skip to content

Commit 4d9b931

Browse files
committed
test/e2e: Preserve the existing environment when using exec.Command (#2876)
Signed-off-by: timflannagan <[email protected]> Upstream-commit: 91e5d90b3ea330c681656af7d0dc160ecb535876 Upstream-repository: operator-lifecycle-manager
1 parent 8ce7b8c commit 4d9b931

File tree

1 file changed

+1
-1
lines changed
  • staging/operator-lifecycle-manager/test/e2e/ctx

1 file changed

+1
-1
lines changed

staging/operator-lifecycle-manager/test/e2e/ctx/ctx.go

Lines changed: 1 addition & 1 deletion
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)