expand $VAR references in env file values and sandbox paths
This commit is contained in:
parent
66d9d0502d
commit
d00a15093d
|
|
@ -110,7 +110,7 @@ func expandPath(pattern, cwd string) string {
|
|||
return match
|
||||
})
|
||||
|
||||
s = paths.ExpandHome(s)
|
||||
s = paths.ExpandHome(os.ExpandEnv(s))
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue