From 8246dc8d8a227dd86f3dfce2de71411d9dc814a8 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Tue, 2 Aug 2011 12:21:30 -0500 Subject: [PATCH] Avoid globals --- bin/rbenv-version | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/rbenv-version b/bin/rbenv-version index b4366688..605c7552 100755 --- a/bin/rbenv-version +++ b/bin/rbenv-version @@ -7,7 +7,7 @@ read_version_file() { } find_version_file() { - root="$(pwd)" + local root="$(pwd)" while [ -n "$root" ]; do if [ -e "${root}/.rbenv-version" ]; then echo "${root}/.rbenv-version" @@ -19,7 +19,7 @@ find_version_file() { } find_default_version_file() { - default_path="$HOME/.rbenv/default" + local default_path="$HOME/.rbenv/default" if [ -e "$default_path" ]; then echo "$default_path" return 0