Open yarikoptic opened 4 years ago
Can't you spell that sh -c '... $PWD ...'
?
(That's not meant as an argument against any tweaks/enhancements to this handling.)
I don't think so - those are arguments to the entry point of a container which isn't a shell .
I am trying to use BIDSonym, but unfortunately due to https://github.com/PeerHerholz/BIDSonym/issues/28 I am doomed to provide "$PWD". With datalad run, since I guess we do magical decision making on either to run in a shell, I could encode entire command as
'$PWD ...'
, so then$PWD
gets expanded by the shell and everything works. In reproman'srun
we useshlex_quote
to guard each command's argument so we have them neatly pasted into command-array etc. Butshlex
does not include$
among safe characters in itsso it quotes the argument whenever it discovers
$
and we then plug that quoted argument into thecommand-array
and nothing ever can expand it into the actual path.@kyleam -- do you see any sensible way to make it possible to submit commands which would still be able to carry env vars to be expanded? (well -- not good for reproducibility somewhat, so not even 100% certain it should be the default behavior)