diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-16 12:32:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 12:32:50 +0200 |
commit | cedbbfa543651a13055a1fe093a4d0a2a28ccdfd (patch) | |
tree | b3ba3112906a8234a0b27a2bad331c9cb5e66a6e /pkg/util | |
parent | a87bba317e403c69b38c65958f2121d7e3f8a58e (diff) | |
parent | 4ae7161c4c775879b8ff3fbdaa5e93ef732cd5c5 (diff) | |
download | podman-cedbbfa543651a13055a1fe093a4d0a2a28ccdfd.tar.gz podman-cedbbfa543651a13055a1fe093a4d0a2a28ccdfd.tar.bz2 podman-cedbbfa543651a13055a1fe093a4d0a2a28ccdfd.zip |
Merge pull request #14247 from n1hility/machine-event-win-41
[v4.1] Cherry-pick windows machine events
Diffstat (limited to 'pkg/util')
-rw-r--r-- | pkg/util/utils_windows.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/util/utils_windows.go b/pkg/util/utils_windows.go index 2732124f2..b91680f7a 100644 --- a/pkg/util/utils_windows.go +++ b/pkg/util/utils_windows.go @@ -4,6 +4,9 @@ package util import ( + "path/filepath" + + "github.com/containers/storage/pkg/homedir" "github.com/pkg/errors" ) @@ -34,7 +37,12 @@ func GetRootlessPauseProcessPidPathGivenDir(unused string) (string, error) { // GetRuntimeDir returns the runtime directory func GetRuntimeDir() (string, error) { - return "", errors.New("this function is not implemented for windows") + data, err := homedir.GetDataHome() + if err != nil { + return "", err + } + runtimeDir := filepath.Join(data, "containers", "podman") + return runtimeDir, nil } // GetRootlessConfigHomeDir returns the config home directory when running as non root |