We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e606f74 commit 46a61e6Copy full SHA for 46a61e6
util.go
@@ -95,19 +95,7 @@ func absPathify(inPath string) string {
95
inPath = userHomeDir() + inPath[5:]
96
}
97
98
- if strings.HasPrefix(inPath, "$") {
99
- end := strings.Index(inPath, string(os.PathSeparator))
100
-
101
- var value, suffix string
102
- if end == -1 {
103
- value = os.Getenv(inPath[1:])
104
- } else {
105
- value = os.Getenv(inPath[1:end])
106
- suffix = inPath[end:]
107
- }
108
109
- inPath = value + suffix
110
+ inPath = os.ExpandEnv(inPath)
111
112
if filepath.IsAbs(inPath) {
113
return filepath.Clean(inPath)
0 commit comments