mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Correctly check that gid parses as an int
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
This commit is contained in:
parent
334382a8c3
commit
8ef79ae8e4
1 changed files with 1 additions and 1 deletions
|
@ -1458,7 +1458,7 @@ func lookupGidByName(nameOrGid string) (int, error) {
|
|||
return groups[0].Gid, nil
|
||||
}
|
||||
gid, err := strconv.Atoi(nameOrGid)
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
log.Warnf("Could not find GID %d", gid)
|
||||
return gid, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue