expand $VAR references in env file values and sandbox paths

This commit is contained in:
Levi Neely 2026-05-20 18:35:09 +02:00
parent 66d9d0502d
commit d00a15093d
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ func expandPath(pattern, cwd string) string {
return match
})
s = paths.ExpandHome(s)
s = paths.ExpandHome(os.ExpandEnv(s))
return s
}

2
pkg/env/env.go vendored
View File

@ -84,7 +84,7 @@ func LoadFile(path string) {
}
v = strings.TrimSpace(v)
if k != "" && os.Getenv(k) == "" {
os.Setenv(k, paths.ExpandHome(v)) //nolint:errcheck
os.Setenv(k, paths.ExpandHome(os.ExpandEnv(v))) //nolint:errcheck
}
}
}