-
Notifications
You must be signed in to change notification settings - Fork 62
Description
After spending an annoying amount of time figuring out @yarikoptic's problem in nipype with dcm2niix failing if a directory had a space in it, I have discovered that it cannot be properly fixed without substantially breaking nipype, as some argstrs rely on not getting quoted.
I would suggest that pydra commit to constructing command lines as lists of arguments that are joined with shlex.join, and use shlex.split when pieces (singularity run) need splitting. shlex.quote is also useful at times, but probably not as much having a clear notion of when you are working with a list of arguments and when you are working with a command line that could be passed to a shell.
It will take a bit of working out and bug fixing, but perhaps we can avoid turning those bugs into load-bearing bugs.