Skip to content

Commit

Permalink
Fixes #1062
Browse files Browse the repository at this point in the history
  • Loading branch information
serazoli authored and sagikazarmark committed Sep 19, 2021
1 parent e606f74 commit 46a61e6
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions util.go
Expand Up @@ -95,19 +95,7 @@ func absPathify(inPath string) string {
inPath = userHomeDir() + inPath[5:]
}

if strings.HasPrefix(inPath, "$") {
end := strings.Index(inPath, string(os.PathSeparator))

var value, suffix string
if end == -1 {
value = os.Getenv(inPath[1:])
} else {
value = os.Getenv(inPath[1:end])
suffix = inPath[end:]
}

inPath = value + suffix
}
inPath = os.ExpandEnv(inPath)

if filepath.IsAbs(inPath) {
return filepath.Clean(inPath)
Expand Down

0 comments on commit 46a61e6

Please sign in to comment.