Append both env variables instead of fetching twice and overriding them.
Previously the second line would fetch the clean environment variables and drop the changes from the first line.
This commit is contained in:
@@ -615,8 +615,9 @@ func CoreDump(dir string) {
|
||||
Logf("Dumping logs locally to: %s", dir)
|
||||
cmd = exec.Command(path.Join(TestContext.RepoRoot, "cluster", "log-dump", "log-dump.sh"), dir)
|
||||
}
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("LOG_DUMP_SYSTEMD_SERVICES=%s", parseSystemdServices(TestContext.SystemdServices)))
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("LOG_DUMP_SYSTEMD_JOURNAL=%v", TestContext.DumpSystemdJournal))
|
||||
env := os.Environ()
|
||||
env = append(env, fmt.Sprintf("LOG_DUMP_SYSTEMD_SERVICES=%s", parseSystemdServices(TestContext.SystemdServices)))
|
||||
cmd.Env = append(env, fmt.Sprintf("LOG_DUMP_SYSTEMD_JOURNAL=%v", TestContext.DumpSystemdJournal))
|
||||
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
|
Reference in New Issue
Block a user