Skip to content

Commit 46a61e6

Browse files
serazolisagikazarmark
authored andcommitted
Fixes #1062
1 parent e606f74 commit 46a61e6

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

util.go

+1-13
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,7 @@ func absPathify(inPath string) string {
9595
inPath = userHomeDir() + inPath[5:]
9696
}
9797

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-
}
98+
inPath = os.ExpandEnv(inPath)
11199

112100
if filepath.IsAbs(inPath) {
113101
return filepath.Clean(inPath)

0 commit comments

Comments
 (0)