From 340becf542b240f82ffda0fe998da334a3ffbd0b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 11 Jul 2018 09:38:04 +0200 Subject: rootless: propagate errors from GetRootlessRuntimeDir() Signed-off-by: Giuseppe Scrivano --- cmd/podman/libpodruntime/runtime.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd/podman/libpodruntime') diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go index e8177d5ee..098864810 100644 --- a/cmd/podman/libpodruntime/runtime.go +++ b/cmd/podman/libpodruntime/runtime.go @@ -24,7 +24,11 @@ func GetRuntime(c *cli.Context) (*libpod.Runtime, error) { func GetRootlessStorageOpts() (storage.StoreOptions, error) { var opts storage.StoreOptions - opts.RunRoot = filepath.Join(libpod.GetRootlessRuntimeDir(), "run") + rootlessRuntime, err := libpod.GetRootlessRuntimeDir() + if err != nil { + return opts, err + } + opts.RunRoot = filepath.Join(rootlessRuntime, "run") dataDir := os.Getenv("XDG_DATA_HOME") if dataDir == "" { -- cgit v1.2.3-54-g00ecf