fix: fixing chmod for windows on postinstall

This commit is contained in:
Chubby Granny Chaser 2024-09-25 19:53:37 +01:00
parent b87aade2a3
commit 0ea7329aa3
No known key found for this signature in database

View File

@ -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...`);