summaryrefslogtreecommitdiff
path: root/pkg/util
diff options
context:
space:
mode:
authorJason T. Greene <jason.greene@redhat.com>2022-05-11 16:42:18 -0500
committerJason T. Greene <jason.greene@redhat.com>2022-05-15 12:01:05 -0500
commit44d253b6c0346319e88287cb14e7e0b2769ccdf9 (patch)
tree90617c8670f3b3b7230b4c5b6dd78595d3c42a10 /pkg/util
parenta87bba317e403c69b38c65958f2121d7e3f8a58e (diff)
downloadpodman-44d253b6c0346319e88287cb14e7e0b2769ccdf9.tar.gz
podman-44d253b6c0346319e88287cb14e7e0b2769ccdf9.tar.bz2
podman-44d253b6c0346319e88287cb14e7e0b2769ccdf9.zip
Add support for machine events on Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
Diffstat (limited to 'pkg/util')
-rw-r--r--pkg/util/utils_windows.go10
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