Skip to content

Commit

Permalink
Remove empty extract target directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Feb 28, 2011
1 parent e8f7f51 commit a3c729a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/manage
Original file line number Diff line number Diff line change
Expand Up @@ -1251,11 +1251,14 @@ __rvm_fetch_ruby()
fi
fi

# Remove the directory if it is empty
( [[ -d "${rvm_src_path}/$rvm_ruby_string" ]] && rmdir "${rvm_src_path}/$rvm_ruby_string" ) || true

if [[ ! -d "${rvm_src_path}/$rvm_ruby_string" \
|| ${rvm_force_flag:-0} -eq 1 ]] ; then

# Especially when forced, we want to ensure the destination is missing.
__rvm_rm_rf "${rvm_src_path}/$rvm_ruby_string"
__rvm_rm_rf "${rvm_src_path}/${rvm_ruby_string}"

mkdir -p "${rvm_tmp_path:-/tmp}/rvm_src_$$"

Expand Down

0 comments on commit a3c729a

Please sign in to comment.