faskowit / app-fmri-2-mat

fmriprep outputs to connectivity matrices
MIT License
7 stars 5 forks source link

App is finishing successfully even when it fails to produce the output #16

Closed soichih closed 3 years ago

soichih commented 3 years ago

A user was seeing a bunch of empty conmat outputs.

hayashis@haswell20:~/proj-5f85099be6432d3acf9286f2 $ tree
.
├── bids
│   └── dataset_description.json
├── README
├── sub-10189
│   └── dt-neuro-conmat.tag-taskswitch.tag-bold.tag-fmriprep.tag-preprocessed.id-5fa72a5ae138ecfd134ed639
│       ├── index.json
│       ├── _info.json
│       └── label.json
├── sub-10217
│   └── dt-neuro-conmat.tag-taskswitch.tag-bold.tag-fmriprep.tag-preprocessed.id-5fa72a5ae138ec46494ed62f
│       ├── index.json
│       ├── _info.json
│       └── label.json
├── sub-10225
│   └── dt-neuro-conmat.tag-taskswitch.tag-bold.tag-fmriprep.tag-preprocessed.id-5fa72a5ae138ec7dc04ed633
│       ├── index.json
│       ├── _info.json
│       └── label.json

And it looks like this App was finishing "successfully" even though it actually failed. I see that "set -e" is commented out on run.sh so probably something happened in it but main script received exit code 0 and determined that everything finished successfully.

Is there anyway you can put set -e, OR add a check in main (maybe check to see if the output file is actually there - and exit code 1 if there isn't?)

faskowit commented 3 years ago

Ok I added a check in run.sh on the master branch -- if that works... ill cut a new release!