diff options
author | Andre Arko <andre@arko.net> | 2011-09-17 12:20:07 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2011-09-17 12:20:07 -0700 |
commit | d758698c4eff5d13eabe33c8e62cbbfc19d648db (patch) | |
tree | bbff7ae1490fd1576b15bc30d9e0114775f69881 /bin | |
parent | 7a624ab4c77f9129b5e77407319c5413a93823f6 (diff) | |
download | bundler-d758698c4eff5d13eabe33c8e62cbbfc19d648db.tar.gz |
rescue interrupts while bundler is loading
closes #1395
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bundle | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -1,15 +1,13 @@ #!/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 + abort "Please remove 0.8 versions of bundler. This can be done by running `gem cleanup bundler`." + end + end + require 'bundler/cli' Bundler::CLI.start rescue Bundler::BundlerError => e Bundler.ui.error e.message |