From 3d2b2e43b1201f74a4c2df808664f3f73d1d7a83 Mon Sep 17 00:00:00 2001 From: mikiher Date: Sat, 27 Jul 2024 23:03:40 +0300 Subject: [PATCH] Set execution permission for downloaded binaries --- server/managers/BinaryManager.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/managers/BinaryManager.js b/server/managers/BinaryManager.js index 11fa9ff8..e937beb1 100644 --- a/server/managers/BinaryManager.js +++ b/server/managers/BinaryManager.js @@ -78,6 +78,12 @@ class GithubAssetDownloader { const outputPath = path.join(destDir, file.outputFileName) await zip.extract(file.pathInsideZip, outputPath) Logger.debug(`[GithubAssetDownloader] Extracted file ${file.pathInsideZip} to ${outputPath}`) + + // Set executable permission for Linux + if (process.platform !== 'win32') { + await fs.chmod(outputPath, 0o755) + console.log(`Set executable permissions for ${outputPath}`) + } } await zip.close()