From cb51707f91e683323ba61fca49363a997ed1be1f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 6 Mar 2020 07:39:32 -0500 Subject: Allow users to set TMPDIR environment Some users have small /var/tmp directories and need to be able to specify a different location for temporary files, which includes more space. Signed-off-by: Daniel J Walsh --- cmd/podman/load.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/load.go b/cmd/podman/load.go index ed6a4e5fa..318b5b5fb 100644 --- a/cmd/podman/load.go +++ b/cmd/podman/load.go @@ -10,6 +10,7 @@ import ( "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/shared/parse" "github.com/containers/libpod/pkg/adapter" + "github.com/containers/libpod/pkg/util" "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/crypto/ssh/terminal" @@ -75,7 +76,7 @@ func loadCmd(c *cliconfig.LoadValues) error { if terminal.IsTerminal(int(os.Stdin.Fd())) { return errors.Errorf("cannot read from terminal. Use command-line redirection or the --input flag.") } - outFile, err := ioutil.TempFile("/var/tmp", "podman") + outFile, err := ioutil.TempFile(util.Tmpdir(), "podman") if err != nil { return errors.Errorf("error creating file %v", err) } -- cgit v1.2.3-54-g00ecf