From cc4aed2e173f527d7d4a5c40f568ce29adba646a Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Fri, 18 Apr 2025 00:06:30 +0100 Subject: [PATCH] fix: fixing date on backup upload --- scripts/postinstall.cjs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/postinstall.cjs b/scripts/postinstall.cjs index 32422dfc..8deddeaa 100644 --- a/scripts/postinstall.cjs +++ b/scripts/postinstall.cjs @@ -10,7 +10,7 @@ const exec = util.promisify(require("node:child_process").exec); const ludusaviVersion = "0.29.0"; const fileName = { - win32: `ludusavi-v${ludusaviVersion}-win64.tar.gz`, + win32: `ludusavi-v${ludusaviVersion}-win64.zip`, linux: `ludusavi-v${ludusaviVersion}-linux.tar.gz`, darwin: `ludusavi-v${ludusaviVersion}-mac.tar.gz`, }; @@ -38,10 +38,14 @@ const downloadLudusavi = async () => { await fs.promises.mkdir(targetPath, { recursive: true }); - await tar.x({ - file: file, - cwd: targetPath, - }); + if (process.platform === "win32") { + await exec(`npx extract-zip ${file} ${targetPath}`); + } else { + await tar.x({ + file: file, + cwd: targetPath, + }); + } if (process.platform !== "win32") { fs.chmodSync(path.join(targetPath, "ludusavi"), 0o755);