Skip to content

Commit

Permalink
Fix bootsnap warning when booting msfrpc service
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Aug 2, 2023
1 parent 69cebde commit 67770d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def invalidate_bootsnap_cache!(bootsnap_config)
}
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
Expand Down
2 changes: 1 addition & 1 deletion msf-json-rpc.ru
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion msf-ws.ru
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 67770d5

Please sign in to comment.