diff --git a/docs/changes/newsfragments/385.bugfix b/docs/changes/newsfragments/385.bugfix new file mode 100644 index 000000000..b30a4d6f8 --- /dev/null +++ b/docs/changes/newsfragments/385.bugfix @@ -0,0 +1 @@ +Use correct return code for ANTs commands while checking presence of external commands by `Synchon Mandal`_ diff --git a/junifer/pipeline/utils.py b/junifer/pipeline/utils.py index f50188156..f8d66f90a 100644 --- a/junifer/pipeline/utils.py +++ b/junifer/pipeline/utils.py @@ -237,7 +237,7 @@ def _check_ants(commands: Optional[list[str]] = None) -> bool: shell=True, # is unsafe but kept for resolution via PATH check=False, ) - command_found = command_process.returncode == 0 + command_found = command_process.returncode == 1 commands_found_results[command] = ( "found" if command_found else "not found" )