From: Daan De Meyer Date: Sat, 21 Sep 2024 16:08:21 +0000 (+0200) Subject: Don't log if output already exists when using Format=none X-Git-Tag: v25~270^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27038d39d568f536e305aedbe38312836a0b7656;p=thirdparty%2Fmkosi.git Don't log if output already exists when using Format=none --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index dcdb5069c..b5cab5097 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4224,7 +4224,13 @@ def run_verb(args: Args, images: Sequence[Config], *, resources: Path) -> None: output = last.output_dir_or_cwd() / last.output_with_compression - if args.verb == Verb.build and not args.force and output.exists() and not output.is_symlink(): + if ( + args.verb == Verb.build + and not args.force + and output.exists() + and not output.is_symlink() + and last.output_format != OutputFormat.none + ): logging.info(f"Output path {output} exists already. (Use --force to rebuild.)") return