Fix bootsnap warning when booting msfrpc service
This commit is contained in:
+2
-2
@@ -91,8 +91,8 @@ begin
|
|||||||
}
|
}
|
||||||
invalidate_bootsnap_cache!(bootsnap_config)
|
invalidate_bootsnap_cache!(bootsnap_config)
|
||||||
Bootsnap.setup(**bootsnap_config)
|
Bootsnap.setup(**bootsnap_config)
|
||||||
rescue
|
rescue => e
|
||||||
$stderr.puts 'Warning: Failed bootsnap cache setup'
|
$stderr.puts "Warning: Failed bootsnap cache setup - #{e.class} #{e} #{e.backtrace}"
|
||||||
begin
|
begin
|
||||||
FileUtils.rm_rf(cache_dir, secure: true)
|
FileUtils.rm_rf(cache_dir, secure: true)
|
||||||
rescue
|
rescue
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ require 'pathname'
|
|||||||
@framework_path = File.expand_path(File.dirname(__FILE__))
|
@framework_path = File.expand_path(File.dirname(__FILE__))
|
||||||
root = Pathname.new(@framework_path).expand_path
|
root = Pathname.new(@framework_path).expand_path
|
||||||
@framework_lib_path = root.join('lib')
|
@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'
|
require 'msfenv'
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ require 'pathname'
|
|||||||
@framework_path = '.'
|
@framework_path = '.'
|
||||||
root = Pathname.new(@framework_path).expand_path
|
root = Pathname.new(@framework_path).expand_path
|
||||||
@framework_lib_path = root.join('lib')
|
@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'
|
require 'msfenv'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user