mirror of
https://github.com/containers/podman.git
synced 2025-12-10 15:47:46 +08:00
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>
18 lines
332 B
Go
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)
|
|
}
|