summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-04 06:19:03 -0800
committerGitHub <noreply@github.com>2019-03-04 06:19:03 -0800
commitc07b55b4a0ebc6f4a4bb7103272998cc1991e4e4 (patch)
tree45d99bbf061698ad8fa73eb6751df6117a0001d7
parent91717023797958532ac31bb46c012e95bcfa6a8d (diff)
parent9bf8bd7bcbf347c11158e6857b7e4cc8ef47680c (diff)
downloadpodman-c07b55b4a0ebc6f4a4bb7103272998cc1991e4e4.tar.gz
podman-c07b55b4a0ebc6f4a4bb7103272998cc1991e4e4.tar.bz2
podman-c07b55b4a0ebc6f4a4bb7103272998cc1991e4e4.zip
Merge pull request #2515 from giuseppe/fill_tmp_dir_for_conf
runtime: fill a proper default tmpdir when --config is used
-rw-r--r--libpod/runtime.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index f53cdd8b8..112b6820a 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -477,6 +477,12 @@ func NewRuntimeFromConfig(configPath string, options ...RuntimeOption) (runtime
runtime.config.OCIRuntime = defaultRuntimeConfig.OCIRuntime
runtime.config.StorageConfig = storage.StoreOptions{}
+ tmpDir, err := getDefaultTmpDir()
+ if err != nil {
+ return nil, err
+ }
+ runtime.config.TmpDir = tmpDir
+
// Check to see if the given configuration file exists
if _, err := os.Stat(configPath); err != nil {
return nil, errors.Wrapf(err, "error checking existence of configuration file %s", configPath)