diff --git a/mkosi/__init__.py b/mkosi/__init__.py index be5e7e851..c57af9f20 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4725,7 +4725,9 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: for i, config in enumerate(images): with prepend_to_environ_path(config): - check_tools(config, args.verb) + if args.verb != Verb.build: + check_tools(config, args.verb) + images[i] = config = run_configure_scripts(config) # The images array has been modified so we need to reevaluate last again. @@ -4775,8 +4777,7 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: continue with prepend_to_environ_path(config): - if args.verb != Verb.build: - check_tools(config, Verb.build) + check_tools(config, Verb.build) check_inputs(config) ensure_directories_exist(config)