%x{ echo hi }
seems to fork off /bin/sh
. I'd prefer /bin/bash
. Is there a way to set that? The best thing I can think of is
%x {/bin/bash -c 'echo hi'}
but that doesn't to report output back like it should. Also, it's a general thing: I just never want /bin/sh
, I always want /bin/bash
Write this somewhere in your Ruby code.
I expect the default shell
/bin/sh
is hardcoded in order to be as portable as possible. To use bash, you could do something like this: