mirror of https://github.com/status-im/consul.git
parent
144e6e7d31
commit
9cd602de06
|
@ -61,12 +61,11 @@ func setFilePermissions(path string, user, group, mode string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try looking up the user by name
|
// Try looking up the user by name
|
||||||
if u, err := osuser.Lookup(user); err == nil {
|
u, err := osuser.Lookup(user)
|
||||||
uid, _ = strconv.Atoi(u.Uid)
|
if err != nil {
|
||||||
goto GROUP
|
return fmt.Errorf("failed to look up user %s: %v", user, err)
|
||||||
}
|
}
|
||||||
|
uid, _ = strconv.Atoi(u.Uid)
|
||||||
return fmt.Errorf("invalid user specified: %v", user)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GROUP:
|
GROUP:
|
||||||
|
|
Loading…
Reference in New Issue