Merge pull request #8725 from rhatdan/TMPDIR

Allow users to specify TMPDIR in containers.conf
This commit is contained in:
OpenShift Merge Robot
2020-12-15 19:35:39 +00:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

@ -31,11 +31,6 @@ func main() {
return
}
// Hard code TMPDIR functions to use /var/tmp, if user did not override
if _, ok := os.LookupEnv("TMPDIR"); !ok {
os.Setenv("TMPDIR", "/var/tmp")
}
rootCmd = parseCommands()
Execute()

View File

@ -178,6 +178,10 @@ func persistentPreRunE(cmd *cobra.Command, args []string) error {
return err
}
}
// Hard code TMPDIR functions to use /var/tmp, if user did not override
if _, ok := os.LookupEnv("TMPDIR"); !ok {
os.Setenv("TMPDIR", "/var/tmp")
}
if !registry.IsRemote() {
if cmd.Flag("cpu-profile").Changed {