File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
# coding: utf-8
2
- # have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
3
- # require realpaths.
4
- lib = File . realpath ( File . expand_path ( '../lib' , __FILE__ ) )
2
+
3
+ # During build, the Gemfile is temporarily moved and
4
+ # we must manually define the project root
5
+ if ENV [ 'MSF_ROOT' ]
6
+ lib = File . realpath ( File . expand_path ( 'lib' , ENV [ 'MSF_ROOT' ] ) )
7
+ else
8
+ # have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
9
+ # require realpaths.
10
+ lib = File . realpath ( File . expand_path ( '../lib' , __FILE__ ) )
11
+ end
12
+
5
13
$LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
6
14
require 'metasploit/framework/version'
7
15
You can’t perform that action at this time.
0 commit comments