Skip to content

Commit

Permalink
Bugfix: --trace actually produces a trace once again.
Browse files Browse the repository at this point in the history
Bugfix: automatically regenerate wrapper scripts if missing.
  • Loading branch information
wayneeseguin committed Sep 17, 2010
1 parent 3bea91f commit 5605295
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 7 additions & 5 deletions scripts/cli
Expand Up @@ -396,12 +396,14 @@ __rvm_parse_args() {
if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi
;;

--debug)
export rvm_debug_flag=1
set -o verbose
;;

--trace|--debug)
local option

export rvm_debug_flag=1

set -o verbose
set -o noclobber
set -o nounset

Expand All @@ -414,10 +416,10 @@ __rvm_parse_args() {

export rvm_trace_flag=1

#set -o xtrace
set -o xtrace

if [[ -z "${ZSH_VERSION:-""}" ]] ; then
export PS4='-[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() > }'
export PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
fi
fi
;;
Expand Down
10 changes: 5 additions & 5 deletions scripts/utility
Expand Up @@ -925,11 +925,11 @@ __rvm_become() {
}

__rvm_ensure_has_environment_files() {
local environment_identifier file_name directory_name wrapper_identifier variable value
local environment_id file_name directory_name wrapper_identifier variable value

environment_identifier="$(__rvm_environment_identifier)"
environment_id="$(__rvm_environment_identifier)"

file_name="${rvm_path}/environments/$environment_identifier"
file_name="${rvm_path}/environments/$environment_id"

if [[ ! -s "$file_name" ]] ; then

Expand All @@ -952,10 +952,10 @@ __rvm_ensure_has_environment_files() {
fi

# Next, ensure we have default wrapper files. Also, prevent it from recursing.
if [[ ${rvm_creating_default_wrappers:-0} -eq 1 ]]; then
if [[ ${rvm_creating_default_wrappers:-0} -eq 1 || ! -f "$rvm_path/wrappers/$environment_id/ruby" ]] ; then

# We need to generate wrappers for both the default gemset and the global gemset.
for wrapper_identifier in "$environment_identifier" "${environment_identifier}@global" ; do
for wrapper_identifier in "$environment_id" "${environment_id//@*/}@global" ; do

rvm_creating_default_wrappers=1

Expand Down

0 comments on commit 5605295

Please sign in to comment.