Updating dependancies. (#9303)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
347ee1d205
Коммит
61e27beabc
1
vendor/github.com/mitchellh/go-homedir/go.mod
сгенерированный
поставляемый
Обычный файл
1
vendor/github.com/mitchellh/go-homedir/go.mod
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1 @@
|
||||
module github.com/mitchellh/go-homedir
|
||||
10
vendor/github.com/mitchellh/go-homedir/homedir.go
сгенерированный
поставляемый
10
vendor/github.com/mitchellh/go-homedir/homedir.go
сгенерированный
поставляемый
@@ -141,14 +141,16 @@ func dirWindows() (string, error) {
|
||||
return home, nil
|
||||
}
|
||||
|
||||
// Prefer standard environment variable USERPROFILE
|
||||
if home := os.Getenv("USERPROFILE"); home != "" {
|
||||
return home, nil
|
||||
}
|
||||
|
||||
drive := os.Getenv("HOMEDRIVE")
|
||||
path := os.Getenv("HOMEPATH")
|
||||
home := drive + path
|
||||
if drive == "" || path == "" {
|
||||
home = os.Getenv("USERPROFILE")
|
||||
}
|
||||
if home == "" {
|
||||
return "", errors.New("HOMEDRIVE, HOMEPATH, and USERPROFILE are blank")
|
||||
return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank")
|
||||
}
|
||||
|
||||
return home, nil
|
||||
|
||||
1
vendor/github.com/mitchellh/mapstructure/go.mod
сгенерированный
поставляемый
Обычный файл
1
vendor/github.com/mitchellh/mapstructure/go.mod
сгенерированный
поставляемый
Обычный файл
@@ -0,0 +1 @@
|
||||
module github.com/mitchellh/mapstructure
|
||||
Ссылка в новой задаче
Block a user