Fix bootsnap warning when booting msfrpc service

This commit is contained in:
adfoster-r7
2023-08-02 17:35:11 +01:00
parent 69cebde238
commit 67770d5684
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
View File
@@ -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'
+1 -1
View File
@@ -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'