mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-11-23 12:43:25 +08:00
builder: component: user.py: gid fallback to uid when user is not found
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
parent
be0624f947
commit
9b621831c4
@ -71,8 +71,5 @@ def parse_user_from(
|
||||
gid = parse_usergroup_from(ctx, node, True, gid)
|
||||
if gid == -1:
|
||||
user = ctx.passwd.lookup_uid(uid)
|
||||
if user is None: raise ArchBuilderConfigError(
|
||||
f"user {user} not found"
|
||||
)
|
||||
gid = user.gid
|
||||
gid = user.gid if user else uid
|
||||
return uid, gid
|
||||
|
Loading…
Reference in New Issue
Block a user