From fc4043c2c487b74c2fb54f087256a212d1098f8b Mon Sep 17 00:00:00 2001 From: Chubby Granny Chaser Date: Wed, 9 Apr 2025 08:01:03 +0100 Subject: [PATCH] Update scripts/postinstall.cjs Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- scripts/postinstall.cjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/postinstall.cjs b/scripts/postinstall.cjs index 6df98f54..871c8faa 100644 --- a/scripts/postinstall.cjs +++ b/scripts/postinstall.cjs @@ -127,6 +127,10 @@ downloadLudusavi(); if (process.platform !== "win32") { const binariesPath = path.join(__dirname, "..", "binaries"); - fs.chmodSync(path.join(binariesPath, "7zz"), 0o755); - fs.chmodSync(path.join(binariesPath, "7zzs"), 0o755); + if (fs.existsSync(binariesPath)) { + const zzzPath = path.join(binariesPath, "7zz"); + const zzzsPath = path.join(binariesPath, "7zzs"); + if (fs.existsSync(zzzPath)) fs.chmodSync(zzzPath, 0o755); + if (fs.existsSync(zzzsPath)) fs.chmodSync(zzzsPath, 0o755); + } }