]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't log if output already exists when using Format=none
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 21 Sep 2024 16:08:21 +0000 (18:08 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 22 Sep 2024 10:20:24 +0000 (12:20 +0200)
mkosi/__init__.py

index dcdb5069c59b702faae427ebeb1d23f3bcdba2bb..b5cab509756f6dd277ea6193bba05ac3f54b2fae 100644 (file)
@@ -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