]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Send stdout to devnull when checking nspawn known arg
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 8 Sep 2022 08:17:58 +0000 (10:17 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 8 Sep 2022 08:17:58 +0000 (10:17 +0200)
We only need stderr, let's send any output printed to stdout
to /dev/null

mkosi/backend.py

index 41d3cbb6bafda0d483bdf37034d95fabe64a72c3..b1debc2d28a205c63d8d3649d2d43ff3c9c5b4fe 100644 (file)
@@ -654,7 +654,8 @@ def var_tmp(root: Path) -> Path:
 
 
 def nspawn_knows_arg(arg: str) -> bool:
-    return "unrecognized option" not in run([nspawn_executable(), arg], stderr=subprocess.PIPE, check=False, text=True).stderr
+    return "unrecognized option" not in run([nspawn_executable(), arg], stdout=subprocess.DEVNULL,
+                                            stderr=subprocess.PIPE, check=False, text=True).stderr
 
 
 def format_rlimit(rlimit: int) -> str: