vendor: update homedir

Fixes #10510
This commit is contained in:
Mitchell Hashimoto 2016-12-03 11:52:54 -08:00
parent 4c9d9ffae8
commit a62a23ee37
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 9 additions and 2 deletions

View File

@ -87,7 +87,7 @@ func dirUnix() (string, error) {
cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid()))
cmd.Stdout = &stdout
if err := cmd.Run(); err != nil {
// If "getent" is missing, ignore it
// If the error is ErrNotFound, we ignore it. Otherwise, return it.
if err != exec.ErrNotFound {
return "", err
}
@ -118,6 +118,11 @@ func dirUnix() (string, error) {
}
func dirWindows() (string, error) {
// First prefer the HOME environmental variable
if home := os.Getenv("HOME"); home != "" {
return home, nil
}
drive := os.Getenv("HOMEDRIVE")
path := os.Getenv("HOMEPATH")
home := drive + path

4
vendor/vendor.json vendored
View File

@ -2042,8 +2042,10 @@
"revisionTime": "2016-10-13T19:53:42Z"
},
{
"checksumSHA1": "V/quM7+em2ByJbWBLOsEwnY3j/Q=",
"path": "github.com/mitchellh/go-homedir",
"revision": "d682a8f0cf139663a984ff12528da460ca963de9"
"revision": "b8bc1bf767474819792c23f32d8286a45736f1c6",
"revisionTime": "2016-12-03T19:45:07Z"
},
{
"path": "github.com/mitchellh/go-linereader",