forked from Mirror/pmbootstrap
install: fix --no-local-pkgs
As chroot.glob() now returns a generator, convert it to a list first to check if it is empty. This may not be the most efficient method, but since we expect it to be empty here it is fine. Without this patch, it always shows the error even if there are no locally built packages: ERROR: --no-local-pkgs specified, but locally built packages found. Consider 'pmbootstrap zap -p' to delete them.
This commit is contained in:
parent
9cec60e057
commit
0478c30e5c
1 changed files with 1 additions and 1 deletions
|
@ -396,7 +396,7 @@ def install(args: PmbArgs) -> None:
|
|||
config.build_pkgs_on_install = False
|
||||
|
||||
# Safest way to avoid installing local packages is having none
|
||||
if (config.work / "packages").glob("*"):
|
||||
if list((config.work / "packages").glob("*")):
|
||||
raise ValueError(
|
||||
"--no-local-pkgs specified, but locally built"
|
||||
" packages found. Consider 'pmbootstrap zap -p'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue