Files
podman/cmd/podman/remoteclientconfig/config_linux.go
TomSweeneyRedHat 5779e89809 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>
2019-07-29 11:29:41 -04:00

18 lines
332 B
Go

package remoteclientconfig
import (
"os"
"path/filepath"
"github.com/docker/docker/pkg/homedir"
)
func getConfigFilePath() string {
path := os.Getenv("XDG_CONFIG_HOME")
if path == "" {
homeDir := homedir.Get()
path = filepath.Join(homeDir, ".config")
}
return filepath.Join(path, "containers", remoteConfigFileName)
}