Skip to content

Commit f0bee2c

Browse files
committed
Silence errors on first uninstall
1 parent cac7746 commit f0bee2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

script/downgrade_bundler_on_old_rails

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ source script/functions.sh
88
if ruby -e "exit(ENV['RAILS_VERSION'].scan(/\d+\.\d+.\d+/)[0].to_f < 5)"; then
99
# On Rails versions less than 5, Bundler 2.0 is not supported
1010
echo "Warning dowgrading to older version of Bundler"
11-
gem uninstall -aIx bundler
11+
12+
set +e
13+
gem uninstall -aIx bundler || echo "Warning error occured removing bundler via gem"
14+
set -e
1215

1316
# this only works on Ruby 2.3 which is luckily the version we need to fix
1417
if is_ruby_23_plus; then

0 commit comments

Comments
 (0)