chruby
chruby copied to clipboard
Rewrite chruby-exec as a function
If chruby-exec
were a function, it would always run in the current shell. It could also reuse other chruby functions.
Pseudo Code
function chruby_exec()
{
(chruby $arguments && eval $command)
}
If chruby-exec is a function, won't it no longer be usable as a way to use chruby-based installs via cron?
Correct. It would force users to explicitly invoke chruby-exec within a shell. This would be one way to prevent users from invoking chruby-exec under the dash shell. Of course, maybe people should just go back to bash -l -c "chruby ...; command here"
.