diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-06 17:42:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-06 17:42:54 +0200 |
commit | 37b40e9acdae6bfa79d53928361540754417cdc6 (patch) | |
tree | 77a8f189ed503f5c75efa27a4702ea8b4e004bb0 /cmd/podman/remoteclientconfig/config_linux.go | |
parent | 3bffe77f824772b841080ea463324f5ae5c833d4 (diff) | |
parent | 5779e898090b7182ad9307e3ddf1087ac913c770 (diff) | |
download | podman-37b40e9acdae6bfa79d53928361540754417cdc6.tar.gz podman-37b40e9acdae6bfa79d53928361540754417cdc6.tar.bz2 podman-37b40e9acdae6bfa79d53928361540754417cdc6.zip |
Merge pull request #3466 from TomSweeneyRedHat/dev/tsweeney/myhome
Touch up XDG, add rootless links
Diffstat (limited to 'cmd/podman/remoteclientconfig/config_linux.go')
-rw-r--r-- | cmd/podman/remoteclientconfig/config_linux.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/remoteclientconfig/config_linux.go b/cmd/podman/remoteclientconfig/config_linux.go index b94941381..5d27f19f2 100644 --- a/cmd/podman/remoteclientconfig/config_linux.go +++ b/cmd/podman/remoteclientconfig/config_linux.go @@ -1,12 +1,17 @@ package remoteclientconfig import ( + "os" "path/filepath" "github.com/docker/docker/pkg/homedir" ) func getConfigFilePath() string { - homeDir := homedir.Get() - return filepath.Join(homeDir, ".config", "containers", remoteConfigFileName) + path := os.Getenv("XDG_CONFIG_HOME") + if path == "" { + homeDir := homedir.Get() + path = filepath.Join(homeDir, ".config") + } + return filepath.Join(path, "containers", remoteConfigFileName) } |