Skip to content

Commit bbc63fc

Browse files
committed
Limit rvm bundler uninstall to Ruby 2.3 as actually documented
1 parent bb2062d commit bbc63fc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

script/downgrade_bundler_on_old_rails

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if ruby -e "exit(ENV['RAILS_VERSION'].scan(/\d+\.\d+.\d+/)[0].to_f < 5)"; then
1212
gem uninstall -aIx bundler || echo "Warning error occured removing bundler via gem"
1313

1414
# this only works on Ruby 2.3 which is luckily the version we need to fix
15-
if is_ruby_23_plus; then
15+
if is_ruby_23; then
1616
rvm @global do gem uninstall -aIx bundler
1717
fi
1818

script/predicate_functions.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ function is_mri_2plus {
5757
fi
5858
}
5959

60+
function is_ruby_23 {
61+
if ruby -e "exit(RUBY_VERSION.to_f == 2.3)"; then
62+
return 0
63+
else
64+
return 1
65+
fi
66+
}
67+
6068
function is_ruby_23_plus {
6169
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
6270
return 0

0 commit comments

Comments
 (0)