Skip to content

Commit

Permalink
rescue interrupts while bundler is loading
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Sep 17, 2011
1 parent 7a624ab commit d758698
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions bin/bundle
@@ -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
Expand Down

0 comments on commit d758698

Please sign in to comment.