Skip to content

Commit 535f69b

Browse files
committed
Append to RUBYOPT for debugger compatibility
MSP-11147 When using Rubymine's debugger, the tests would run and say there were no tests and no break points would be hit. It was determined that this was due the Rubymine's debugger injecting itself into RUBYOPTS and only working if it's first in RUBYOPT, which means that 'metasploit:framework:spec:threads:suite' must inject '-Ilib -rmetasploit/framework/spec/threads/logger' at the end of RUBOPT instead of the beginning.
1 parent 2fc6154 commit 535f69b

File tree

1 file changed

+2
-1
lines changed
  • lib/metasploit/framework/spec/threads

1 file changed

+2
-1
lines changed

lib/metasploit/framework/spec/threads/suite.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def self.define_task
118118
threads_logger_pathname = parent_pathname.join('logger')
119119
load_pathname = parent_pathname.parent.parent.parent.parent.expand_path
120120

121-
ENV['RUBYOPT'] = "-I#{load_pathname} -r#{threads_logger_pathname} #{ENV['RUBYOPT']}"
121+
# Must append to RUBYOPT or Rubymine debugger will not work
122+
ENV['RUBYOPT'] = "#{ENV['RUBYOPT']} -I#{load_pathname} -r#{threads_logger_pathname}"
122123
end
123124

124125
Rake::Task.define_task(spec: 'metasploit:framework:spec:threads:suite')

0 commit comments

Comments
 (0)