From e61dc9798f3231fe8d750f70b33e9ae515ae79df Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 14 Jul 2020 22:32:54 +0200 Subject: [PATCH] Disable the initial key refresh It takes 10 seconds and in the common case doesn't change anything. It would only be relevant in case an existing key in the keyring expires which can easily be prevented if we always use the newest installer (which is a good idea anyway, to keep the amount of initial updates low) Fixes #45 --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index 6b98ce8..92f1e4c 100644 --- a/main.js +++ b/main.js @@ -56,6 +56,10 @@ async function run() { changeGroup('Extracting MSYS2...'); await exec.exec(inst_dest, ['-y'], {cwd: dest}); + + changeGroup('Disable Key Refresh...'); + let post_file = `${dest}\\msys64\\etc\\post-install\\07-pacman-key.post`; + await exec.exec(`powershell.exe`, [`((Get-Content -path ${post_file} -Raw) -replace '--refresh-keys', '--version') | Set-Content -Path ${post_file}`]); core.endGroup(); }