diff --git a/core/core.go b/core/core.go index dd7ee469..d013d270 100644 --- a/core/core.go +++ b/core/core.go @@ -92,10 +92,9 @@ func ExpandPath(path string) (string, error) { if strings.HasPrefix(path, "~") { if usr, err := user.Current(); err != nil { return "", err - } else { - // Replace only the first occurrence of ~ - path = strings.Replace(path, "~", usr.HomeDir, 1) } + // Replace only the first occurrence of ~ + path = strings.Replace(path, "~", usr.HomeDir, 1) } return filepath.Abs(path) }