mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-02 13:48:00 +00:00
Merge pull request #4657 from jdieter/fix-runtime-path-when-root
Return empty runtime directory if we're not rootless
This commit is contained in:
commit
7287f69b52
1 changed files with 4 additions and 0 deletions
|
|
@ -20,6 +20,10 @@ import (
|
|||
func GetRuntimeDir() (string, error) {
|
||||
var rootlessRuntimeDirError error
|
||||
|
||||
if !rootless.IsRootless() {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
rootlessRuntimeDirOnce.Do(func() {
|
||||
runtimeDir := os.Getenv("XDG_RUNTIME_DIR")
|
||||
uid := fmt.Sprintf("%d", rootless.GetRootlessUID())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue