chroot: fix args.user (MR 2252)

config.user and args.user are distinct, don't combine them.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-08 04:35:55 +02:00 committed by Oliver Smith
parent bc0b6e39e8
commit 3473422639
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 2 additions and 2 deletions

View file

@ -162,7 +162,7 @@ def netboot(args: PmbArgs):
def chroot(args: PmbArgs):
# Suffix
chroot = _parse_suffix(args)
user = get_context().config.user
user = args.user
if (user and chroot != Chroot.native() and
not chroot.type == ChrootType.BUILDROOT):
raise RuntimeError("--user is only supported for native or"