Files
metasploit-gs/lib/msfenv.rb
T

33 lines
643 B
Ruby
Raw Normal View History

2012-04-15 23:35:38 -05:00
#
2013-01-08 22:58:45 -06:00
# Use bundler to load dependencies
2012-04-15 23:35:38 -05:00
#
GEMFILE_EXTENSIONS = [
'.local',
''
]
unless ENV['BUNDLE_GEMFILE']
require 'pathname'
msfenv_real_pathname = Pathname.new(__FILE__).realpath
root = msfenv_real_pathname.parent.parent
GEMFILE_EXTENSIONS.each do |extension|
extension_pathname = root.join("Gemfile#{extension}")
if extension_pathname.readable?
2014-06-18 14:53:41 -05:00
ENV['BUNDLE_GEMFILE'] ||= extension_pathname.to_path
break
end
end
2014-02-21 13:37:31 -06:00
end
2013-01-08 22:58:45 -06:00
begin
require 'bundler/setup'
rescue ::LoadError
$stderr.puts "[*] Metasploit requires the Bundler gem to be installed"
$stderr.puts " $ gem install bundler"
exit(0)
2012-04-15 23:35:38 -05:00
end