Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Commit

Permalink
Updated the Bundler auto-detection boilerplate code.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Aug 15, 2010
1 parent 4df2dd7 commit 3ecaac2
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions bin/ronin-scanners
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
require 'rubygems'

root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..'))
if File.directory?(File.join(root_dir,'.bundle'))
require 'bundler'
if File.directory?(File.join(root_dir,'.git'))
Dir.chdir(root_dir) do |path|
require 'bundler'

begin
Bundler.setup(:runtime)
rescue Bundler::BundlerError => e
STDERR.puts e.message
STDERR.puts "Run `bundle install` to install missing gems"
exit e.status_code
begin
Bundler.setup(:runtime)
rescue Bundler::BundlerError => e
STDERR.puts e.message
STDERR.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
end
end

Expand Down

0 comments on commit 3ecaac2

Please sign in to comment.