Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fixed Scripts/antsAtroposN4.sh not stopping when subcommands exit with exitcode>0 #1456

Merged
merged 2 commits into from
Nov 28, 2022

Conversation

br-cpvc
Copy link
Contributor

@br-cpvc br-cpvc commented Nov 22, 2022

Scripts/antsAtroposN4.sh was not stopping as "${PIPESTATUS[0]}" was always 0, this happened because of "logCmdOutput=" which I this starts a subshell which have the PIPESTATUS variable inside it, but this variable is not visable outside the subshell. The PIPESTATUS is now instead return by the subshell and its exitcode is inserted into cmdExit.

commands use to reproduce the problem:

wget https://openneuro.org/crn/datasets/ds004288/snapshots/1.0.1/files/sub-0303:anat:sub-0303_T1w.nii.gz
mkdir tmp_antsAtroposN4
ANTSPATH=/usr/bin/ time ./deps/ANTs/Scripts/antsAtroposN4.sh -d 3 -c 3 -m 3 -n 3 -a sub-0303\:anat\:sub-0303_T1w.nii.gz -o tmp_antsAtroposN4/ -u 0 -e "[35x35x35x35,0]" -f 4

which should fail because of the missing -x parameter.

Copy link
Member

@cookpa cookpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this

@cookpa cookpa merged commit 9f8e682 into ANTsX:master Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants