forked from Mirror/pmbootstrap
Fix custom pmaports dir (pmbootstrap --args) (MR 2342)
The aports argument is a list of paths now, so iterate over each of them when checking if they exist. Fix for: INFO:root:ERROR: 'list' object has no attribute 'exists'
This commit is contained in:
parent
6915c6a17b
commit
91aee0b34c
1 changed files with 7 additions and 4 deletions
|
@ -54,9 +54,12 @@ def init(args: PmbArgs) -> PmbArgs:
|
|||
# sys.exit(0)
|
||||
config = pmb.config.load(args.config)
|
||||
|
||||
if args.aports and not args.aports.exists():
|
||||
if args.aports:
|
||||
for pmaports_dir in args.aports:
|
||||
if pmaports_dir.exists():
|
||||
continue
|
||||
raise ValueError(
|
||||
"pmaports path (specified with --aports) does" f" not exist: {args.aports}"
|
||||
f"pmaports path (specified with --aports) does not exist: {pmaports_dir}"
|
||||
)
|
||||
|
||||
# Override config at runtime with command line arguments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue