Use Rex::Compat.open_file to open profiling report
MSP-11368 Use Rex::Compat.open_file instead of `system('open <pdf>')` so that opening the pdf works on Linux in addition to OSX.bug/bundler_fix
parent
b863978028
commit
9b92d0d6d4
|
@ -27,13 +27,12 @@ if ENV['METASPLOIT_FRAMEWORK_PROFILE'] == 'true'
|
|||
|
||||
puts "Generating pdf"
|
||||
|
||||
pdf_pathname = "#{profile_pathname}.pdf"
|
||||
pdf_path = "#{profile_pathname}.pdf"
|
||||
|
||||
if Bundler.clean_system("pprof.rb --pdf #{profile_pathname} > #{pdf_path}")
|
||||
puts "PDF saved to #{pdf_path}"
|
||||
|
||||
if Bundler.clean_system("pprof.rb --pdf #{profile_pathname} > #{pdf_pathname}")
|
||||
puts "PDF saved to #{pdf_pathname}"
|
||||
|
||||
system("open #{pdf_pathname}")
|
||||
Rex::Compat.open_file(pdf_path)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue