Skip to content

Commit f57a3c2

Browse files
Merge pull request #20358 from adfoster-r7/fix-module-cache-generation
Fix module cache generation
2 parents 50a2749 + 66bae42 commit f57a3c2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/automation/cache/build_new_cache.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/sh -ex
22
bundle install
3-
rm db/modules_metadata_base.json
3+
rm -f db/modules_metadata_base.json
44
git ls-files modules/ -z | xargs -0 -n1 -P `nproc` -I{} -- git log -1 --format="%ai {}" {} | while read -r udate utime utz ufile ; do
55
touch -d "$udate $utime" $ufile
66
done
7-
./msfconsole -qr tools/automation/cache/wait_for_cache.rc
7+
./msfconsole --no-defer-module-loads -qr tools/automation/cache/wait_for_cache.rc
88
cp ~/.msf4/store/modules_metadata.json db/modules_metadata_base.json
99
cp ~/.msf4/logs/framework.log .
1010
set +e

tools/automation/cache/wait_for_cache.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<ruby>
22
require "msf/core/modules/metadata/store"
33

4-
UserMetaDataFile = Msf::Modules::Metadata::Store::UserMetaDataFile
4+
user_meta_data_file = Msf::Modules::Metadata::Store::UserMetaDataFile
55
store_dir = File.join(Msf::Config.config_directory, "store")
6-
cache_file = File.join(store_dir, UserMetaDataFile)
6+
cache_file = File.join(store_dir, user_meta_data_file)
77
framework.modules.refresh_cache_from_module_files
88
while true do
99
break if File.exist?(cache_file)

0 commit comments

Comments
 (0)