From 46a61e6fbdeb99b19bb53edb97d04e8fcf53e839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9ra=20Zolt=C3=A1n?= Date: Fri, 15 Jan 2021 10:29:58 +0200 Subject: [PATCH] Fixes #1062 --- util.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/util.go b/util.go index cee6b24..09d051a 100644 --- a/util.go +++ b/util.go @@ -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)