Fix bootsnap warning when booting msfrpc service
This commit is contained in:
parent
69cebde238
commit
67770d5684
|
@ -91,8 +91,8 @@ begin
|
|||
}
|
||||
invalidate_bootsnap_cache!(bootsnap_config)
|
||||
Bootsnap.setup(**bootsnap_config)
|
||||
rescue
|
||||
$stderr.puts 'Warning: Failed bootsnap cache setup'
|
||||
rescue => e
|
||||
$stderr.puts "Warning: Failed bootsnap cache setup - #{e.class} #{e} #{e.backtrace}"
|
||||
begin
|
||||
FileUtils.rm_rf(cache_dir, secure: true)
|
||||
rescue
|
||||
|
|
|
@ -7,7 +7,7 @@ require 'pathname'
|
|||
@framework_path = File.expand_path(File.dirname(__FILE__))
|
||||
root = Pathname.new(@framework_path).expand_path
|
||||
@framework_lib_path = root.join('lib')
|
||||
$LOAD_PATH << @framework_lib_path unless $LOAD_PATH.include?(@framework_lib_path)
|
||||
$LOAD_PATH << @framework_lib_path.to_path unless $LOAD_PATH.include?(@framework_lib_path)
|
||||
|
||||
require 'msfenv'
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'pathname'
|
|||
@framework_path = '.'
|
||||
root = Pathname.new(@framework_path).expand_path
|
||||
@framework_lib_path = root.join('lib')
|
||||
$LOAD_PATH << @framework_lib_path unless $LOAD_PATH.include?(@framework_lib_path)
|
||||
$LOAD_PATH << @framework_lib_path.to_path unless $LOAD_PATH.include?(@framework_lib_path)
|
||||
|
||||
require 'msfenv'
|
||||
|
||||
|
|
Loading…
Reference in New Issue