diff --git a/siso.py b/siso.py index 7e267cced4..38d34607b6 100644 --- a/siso.py +++ b/siso.py @@ -44,7 +44,9 @@ def parse_args(args): # Subcommand completes successfully if subcommand is present, returning 0, # and 2 if it's not present. def _is_subcommand_present(siso_path: str, subc: str) -> bool: - return subprocess.call([siso_path, "help", subc]) == 0 + return subprocess.call([siso_path, "help", subc], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL) == 0 # Fetch PID platform independently of possibly running collector diff --git a/tests/siso_test.py b/tests/siso_test.py index 7dac8e9b4c..ddb6a7851f 100755 --- a/tests/siso_test.py +++ b/tests/siso_test.py @@ -70,7 +70,7 @@ ninja --failure_verbose=false -k=0 @mock.patch('siso.subprocess.call') def test_is_subcommand_present(self, mock_call): - def side_effect(cmd): + def side_effect(cmd, *_, **__): if cmd[2] in ['collector', 'ninja']: return 0 return 2