diff options
author | TomSweeneyRedHat <tsweeney@redhat.com> | 2019-07-01 14:35:13 -0400 |
---|---|---|
committer | TomSweeneyRedHat <tsweeney@redhat.com> | 2019-07-29 11:29:41 -0400 |
commit | 5779e898090b7182ad9307e3ddf1087ac913c770 (patch) | |
tree | 6d299bd2db2c339297edddc479a1be19a59de8a6 /cmd/podman/remoteclientconfig | |
parent | 6665269ab8bd413799df6568a83a3ac679c93ad1 (diff) | |
download | podman-5779e898090b7182ad9307e3ddf1087ac913c770.tar.gz podman-5779e898090b7182ad9307e3ddf1087ac913c770.tar.bz2 podman-5779e898090b7182ad9307e3ddf1087ac913c770.zip |
Touch up XDG, add rootless links
Touch up a number of formating issues for XDG_RUNTIME_DIRS in a number
of man pages. Make use of the XDG_CONFIG_HOME environment variable
in a rootless environment if available, or set it if not.
Also added a number of links to the Rootless Podman config page and
added the location of the auth.json files to that doc.
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'cmd/podman/remoteclientconfig')
-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) } |