From 0ea7329aa3e928812ba112f50ede31d2876a2c5d Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Wed, 25 Sep 2024 19:53:37 +0100 Subject: [PATCH] fix: fixing chmod for windows on postinstall --- postinstall.cjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/postinstall.cjs b/postinstall.cjs index ce9c5909..25d27c0a 100644 --- a/postinstall.cjs +++ b/postinstall.cjs @@ -30,10 +30,15 @@ const downloadLudusavi = async () => { console.log(`Downloaded ${file}, extracting...`); const pwd = process.cwd(); + const targetPath = path.join(pwd, "ludusavi"); await exec(`npx extract-zip ${file} ${targetPath}`); - fs.chmodSync(path.join(targetPath, "ludusavi"), 0o755); + + if (process.platform !== "win32") { + fs.chmodSync(path.join(targetPath, "ludusavi"), 0o755); + } + console.log("Extracted. Renaming folder..."); console.log(`Extracted ${file}, removing compressed downloaded file...`);