rvm 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  default_flag="$rvm_default_flag"
4
+
4
5
  # Prevent recursion
5
- unset rvm_default_flag rvm_wrapper_name
6
+ unset rvm_default_flag rvm_wrapper_name prefix
6
7
 
7
8
  source "$rvm_path/scripts/base"
8
9
 
@@ -36,7 +37,7 @@ if [[ -s \"$rvm_path/environments/${environment_identifier}\" ]] ; then
36
37
  \\. \"$rvm_path/environments/${environment_identifier}\"
37
38
  exec $binary_name \"\$@\"
38
39
  else
39
- echo \"ERROR: Missing RVM environment file: '${rvm_environments_path}/${environment_identifier}'\"
40
+ echo \"ERROR: Missing RVM environment file: '$rvm_path/environments/${environment_identifier}'\"
40
41
  exit 1
41
42
  fi
42
43
  " > "$file_name"
@@ -55,19 +56,26 @@ symlink_binary() {
55
56
  # We first check if we can wrap the binary and if we were able to,
56
57
  # we then symlink it into place.
57
58
  if wrap_binary && [[ -f "$file_name" ]]; then
58
- rm -f "${rvm_bin_path}/${prefix}_${binary_name}"
59
59
 
60
- ln -fs "$file_name" "${rvm_bin_path}/${prefix}_${binary_name}"
60
+ rm -f "${rvm_bin_path:-"$rvm_path/bin"}/${prefix}_${binary_name}"
61
+
62
+ ln -fs "$file_name" "${rvm_bin_path:-"$rvm_path/bin"}/${prefix}_${binary_name}"
63
+
61
64
  fi
62
65
  }
63
66
 
64
67
  wrap_binary() {
65
68
  # We wrap when the given binary is in the path or override_check is set to one.
66
69
  if [[ "$override_check" = "1" ]] || command -v $binary_name > /dev/null; then
70
+
67
71
  wrap
72
+
68
73
  else
74
+
69
75
  "$rvm_path/scripts/log" "error" "Binary '$binary_name' not found in path."
76
+
70
77
  return 1
78
+
71
79
  fi
72
80
  }
73
81
 
@@ -104,7 +112,7 @@ environment_identifier="$(__rvm_environment_identifier)"
104
112
  # it to the existing wrapper if needed.
105
113
  for binary_name in "${binaries[@]}"; do
106
114
 
107
- file_name="${rvm_wrappers_path}/${environment_identifier}/${binary_name}"
115
+ file_name="$rvm_path/wrappers/${environment_identifier}/${binary_name}"
108
116
 
109
117
  if [[ -z "$prefix" ]] ; then
110
118
 
@@ -116,14 +124,19 @@ for binary_name in "${binaries[@]}"; do
116
124
  if [[ -f "$file_name" ]]; then
117
125
 
118
126
  if [[ "$binary_name" == "ruby" ]] ; then
119
- destination="$rvm_bin_path/$environment_identifier"
127
+
128
+ destination="${rvm_bin_path:-"$rvm_path/bin"}/$environment_identifier"
129
+
120
130
  else
121
- destination="$rvm_bin_path/${binary_name}-${environment_identifier}"
131
+
132
+ destination="${rvm_bin_path:-"$rvm_path/bin"}/${binary_name}-${environment_identifier}"
133
+
122
134
  fi
123
135
 
124
136
  rm -rf "$destination"
125
137
 
126
138
  ln -nsf "$file_name" "$destination"
139
+
127
140
  fi; unset destination
128
141
 
129
142
  elif [[ "$prefix" == "--no-prefix" ]]; then
@@ -134,7 +147,7 @@ for binary_name in "${binaries[@]}"; do
134
147
 
135
148
  if [[ -f "$file_name" ]]; then
136
149
 
137
- destination="$rvm_bin_path/$binary_name"
150
+ destination="${rvm_bin_path:-"$rvm_path/bin"}/$binary_name"
138
151
 
139
152
  if [[ -s "$destination" ]] ; then
140
153
  rm -rf "$destination"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 7
10
- version: 1.0.7
9
+ - 8
10
+ version: 1.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wayne E. Seguin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-11 00:00:00 -04:00
18
+ date: 2010-09-14 00:00:00 -04:00
19
19
  default_executable: rvm-install
20
20
  dependencies: []
21
21