Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Prevent $command from leaking outside of function #189

Merged
merged 1 commit into from

3 participants

@amarshall

The $command variable currently sticks around after rbenv finishes executing, overwriting any previous value.

$ command=foo; echo $command; rbenv --help &> /dev/null; echo $command
foo
--help
@NewAlexandria

This works in my environment.
:wolf:

@sstephenson sstephenson merged commit a49b079 into sstephenson:master
@sstephenson
Owner

How embarrassing! Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 4, 2012
  1. @amarshall
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  libexec/rbenv-init
View
2  libexec/rbenv-init
@@ -86,7 +86,7 @@ commands=(`rbenv commands --sh`)
IFS="|"
cat <<EOS
rbenv() {
- command="\$1"
+ local command="\$1"
if [ "\$#" -gt 0 ]; then
shift
fi
Something went wrong with that request. Please try again.