spiegel_podman/cmd/podman/remoteclientconfig/config_linux.go
Valentin Rothberg 6f1ba67300 use storage/pkg/homedir
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-03-09 08:57:23 +01:00

17 lines
337 B
Go

package remoteclientconfig
import (
"os"
"path/filepath"
"github.com/containers/storage/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)
}