Open somso2e opened 1 year ago
Bash is expanding the glob in your example, instead of Python. The fix here would be to rewrite run_command()
to avoid calling a shell to interpret its command line. I'm not sure what all that would end up breaking, as we almost certainly have depended on this behavior.
fslmerge
command in cmdline already supports glob patterns such as /*/ and /**/ so I don't see a point in them not working in nipype. The reason I'm complaining about this is because of bash's limit when you have a lot of files to merge, each having a really long name.Running the below command, for example, works perfectly fine:
fslmerge -t -tr out.nii.gz /inputs/func/*.nii 3
The equivalent in python would be:
This might lead to a ridiculously long command that could hit bash's limit if the parent directory or the file names are too long.
In my case this is my generated cmdline: