You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are reasons to want to avoid embedding shell syntax into tasks if we can. Once we use shell syntax ruby automatically switches to shelling out to the default shell rather than executing the process directly. Among other issues, this exposes us to more expansion surprises, differences of behavior on different systems, and commands that flat-out don't work on some platforms. It also opens up security considerations in any context where we may be interpolating info from an untrusted source. Maybe rare for Rake scripts, but possible.
Avoiding shelling out is always the safer and more predictable option. It would be nice to be able to do the safe thing and still have a reasonable echo of how to reproduce it from the command line.
Activity
avdi commentedon Oct 1, 2020
(I'm mostly just capturing some TODOs for myself here as I find features I'd like to contribute)
mblumtritt commentedon Aug 5, 2022
Does this does not work?
avdi commentedon Aug 5, 2022
There are reasons to want to avoid embedding shell syntax into tasks if we can. Once we use shell syntax ruby automatically switches to shelling out to the default shell rather than executing the process directly. Among other issues, this exposes us to more expansion surprises, differences of behavior on different systems, and commands that flat-out don't work on some platforms. It also opens up security considerations in any context where we may be interpolating info from an untrusted source. Maybe rare for Rake scripts, but possible.
Avoiding shelling out is always the safer and more predictable option. It would be nice to be able to do the safe thing and still have a reasonable echo of how to reproduce it from the command line.