summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 9836b7aab..f7ca6b135 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -505,10 +505,6 @@ func newRuntimeFromConfig(userConfigPath string, options ...RuntimeOption) (runt
return nil, errors.Wrapf(err, "error configuring runtime")
}
}
- if err := makeRuntime(runtime); err != nil {
- return nil, err
- }
-
if !foundConfig && rootlessConfigPath != "" {
os.MkdirAll(filepath.Dir(rootlessConfigPath), 0755)
file, err := os.OpenFile(rootlessConfigPath, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
@@ -523,6 +519,9 @@ func newRuntimeFromConfig(userConfigPath string, options ...RuntimeOption) (runt
}
}
}
+ if err := makeRuntime(runtime); err != nil {
+ return nil, err
+ }
return runtime, nil
}