Skip to content
This repository was archived by the owner on Jun 12, 2023. It is now read-only.

Commit bbc43a0

Browse files
committed
Split the chruby-exec command into smaller pieces.
1 parent 45e626f commit bbc43a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/chruby-exec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ shell_opts=("-l")
3838
[[ -t 0 ]] && shell_opts+=("-i")
3939

4040
source_command="command -v chruby >/dev/null || source $chruby_sh"
41-
command="$source_command; chruby $(printf "%q " "${argv[@]}") && $(printf "%q " "$@")"
41+
chruby_command="chruby $(printf "%q " "${argv[@]}")"
42+
sub_command="$(printf "%q " "$@")"
43+
command="$source_command; $chruby_command && $sub_command"
4244

4345
exec "$SHELL" "${shell_opts[@]}" -c "$command"

0 commit comments

Comments
 (0)