mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
parent
4c9d9ffae8
commit
a62a23ee37
7
vendor/github.com/mitchellh/go-homedir/homedir.go
generated
vendored
7
vendor/github.com/mitchellh/go-homedir/homedir.go
generated
vendored
@ -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
4
vendor/vendor.json
vendored
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user