diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bundle | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/bundle b/bin/bundle index f545fa6da9..3dd87a1770 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,15 +1,15 @@ #!/usr/bin/env ruby - -# Check if an older version of bundler is installed -require 'bundler' -$:.each do |path| - if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9 - abort "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`." - end -end -require 'bundler/cli' - begin + require 'bundler' + # Check if an older version of bundler is installed + $:.each do |path| + if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9 + err = "Please remove Bundler 0.8 versions." + err << "This can be done by running `gem cleanup bundler`." + abort(err) + end + end + require 'bundler/cli' Bundler::CLI.start rescue Bundler::BundlerError => e Bundler.ui.error e.message |