Merge pull request #105 from rapid7/bug/MSP-10684-electro-installers
MSP-10684 Allow declaring root via env var in gemspecsbug/bundler_fix
commit
ff017f83f7
|
@ -1,7 +1,15 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
# have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
|
|
||||||
# require realpaths.
|
# During build, the Gemfile is temporarily moved and
|
||||||
lib = File.realpath(File.expand_path('../lib', __FILE__))
|
# we must manually define the project root
|
||||||
|
if ENV['MSF_ROOT']
|
||||||
|
lib = File.realpath(File.expand_path('lib', ENV['MSF_ROOT']))
|
||||||
|
else
|
||||||
|
# have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
|
||||||
|
# require realpaths.
|
||||||
|
lib = File.realpath(File.expand_path('../lib', __FILE__))
|
||||||
|
end
|
||||||
|
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require 'metasploit/framework/version'
|
require 'metasploit/framework/version'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue