summaryrefslogtreecommitdiff
path: root/cmd/podman/main.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-10-03 10:41:47 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-10-03 10:41:47 +0200
commit2f73a9b0f6225819fb8bf53d103438ddf4421441 (patch)
tree60fe25f1728dd90cd6fceec3a9a7a16bb3106865 /cmd/podman/main.go
parentd5687946f6a0aa14a5326f26ca0ceca68588056f (diff)
downloadpodman-2f73a9b0f6225819fb8bf53d103438ddf4421441.tar.gz
podman-2f73a9b0f6225819fb8bf53d103438ddf4421441.tar.bz2
podman-2f73a9b0f6225819fb8bf53d103438ddf4421441.zip
rootless: always set XDG_RUNTIME_DIR
it is used internally by containers/image to locate the auth file. Closes: https://github.com/containers/libpod/issues/1457 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd/podman/main.go')
-rw-r--r--cmd/podman/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 840650a3f..d4c8454a8 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -7,6 +7,7 @@ import (
"runtime/pprof"
"syscall"
+ "github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/hooks"
_ "github.com/containers/libpod/pkg/hooks/0.1.0"
"github.com/containers/libpod/pkg/rootless"
@@ -109,6 +110,10 @@ func main() {
}
app.Before = func(c *cli.Context) error {
+ if err := libpod.SetXdgRuntimeDir(""); err != nil {
+ logrus.Errorf(err.Error())
+ os.Exit(1)
+ }
args := c.Args()
if args.Present() {
if _, notRequireRootless := cmdsNotRequiringRootless[args.First()]; !notRequireRootless {