Skip to content

Commit

Permalink
Only run sync scripts if we're going to build the image
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer committed Aug 29, 2024
1 parent 8c2f828 commit cfd0eb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4829,7 +4829,10 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None:
with prepend_to_environ_path(config):
check_tools(config, args.verb)
images[i] = config = run_configure_scripts(config)
run_sync_scripts(config)

# Only run sync scripts if we're going to build the image.
if not (last.output_dir_or_cwd() / last.output).exists() or last.output_format == OutputFormat.none:
run_sync_scripts(config)

# The images array has been modified so we need to reevaluate last again.
last = images[-1]
Expand Down

0 comments on commit cfd0eb2

Please sign in to comment.