Skip to content

Commit 2013178

Browse files
committed
Use realpath to resolve symlinks in MSF_ROOT
1 parent f29050b commit 2013178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metasploit-framework.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# During build, the Gemfile is temporarily moved and
44
# we must manually define the project root
55
if ENV['MSF_ROOT']
6-
lib = Pathname.new(ENV['MSF_ROOT']).join('lib').to_path
6+
lib = File.realpath(File.expand_path('lib', ENV['MSF_ROOT']))
77
else
88
# have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
99
# require realpaths.

0 commit comments

Comments
 (0)