forked from Mirror/pmbootstrap
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:
parent
bc0b6e39e8
commit
3473422639
2 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ def init(args: PmbArgs) -> PmbArgs:
|
||||||
|
|
||||||
# Override config at runtime with command line arguments
|
# Override config at runtime with command line arguments
|
||||||
for key, _ in vars(config).items():
|
for key, _ in vars(config).items():
|
||||||
if key.startswith("_"):
|
if key.startswith("_") or key == "user":
|
||||||
continue
|
continue
|
||||||
value = getattr(args, key, None)
|
value = getattr(args, key, None)
|
||||||
if value:
|
if value:
|
||||||
|
|
|
@ -162,7 +162,7 @@ def netboot(args: PmbArgs):
|
||||||
def chroot(args: PmbArgs):
|
def chroot(args: PmbArgs):
|
||||||
# Suffix
|
# Suffix
|
||||||
chroot = _parse_suffix(args)
|
chroot = _parse_suffix(args)
|
||||||
user = get_context().config.user
|
user = args.user
|
||||||
if (user and chroot != Chroot.native() and
|
if (user and chroot != Chroot.native() and
|
||||||
not chroot.type == ChrootType.BUILDROOT):
|
not chroot.type == ChrootType.BUILDROOT):
|
||||||
raise RuntimeError("--user is only supported for native or"
|
raise RuntimeError("--user is only supported for native or"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue