forked from lug/matterbridge
Update dependencies (#1610)
* Update dependencies * Update module to go 1.17
This commit is contained in:
14
vendor/github.com/spf13/viper/util.go
generated
vendored
14
vendor/github.com/spf13/viper/util.go
generated
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user