diff options
Diffstat (limited to 'vendor/github.com/mitchellh/go-homedir/homedir.go')
-rw-r--r-- | vendor/github.com/mitchellh/go-homedir/homedir.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go index 8996b02..47e1f9e 100644 --- a/vendor/github.com/mitchellh/go-homedir/homedir.go +++ b/vendor/github.com/mitchellh/go-homedir/homedir.go @@ -87,8 +87,8 @@ 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 err == exec.ErrNotFound { + // If the error is ErrNotFound, we ignore it. Otherwise, return it. + if err != exec.ErrNotFound { return "", err } } else { |