Permalink
Browse files

rescue interrupts while bundler is loading

closes #1395
  • Loading branch information...
1 parent 7a624ab commit d758698c4eff5d13eabe33c8e62cbbfc19d648db @indirect indirect committed Sep 17, 2011
Showing with 8 additions and 10 deletions.
  1. +8 −10 bin/bundle
View
@@ -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

0 comments on commit d758698

Please sign in to comment.