From b07e2f299907989671c63bb5ee100bdc13f45eb5 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 14 Aug 2023 17:52:28 -0700 Subject: set permissions to /exe --- .github/workflows/main.yaml | 5 +++++ extension/src/activation/environmentSetup.ts | 21 +++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 340344a3..19fe1f15 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -84,6 +84,11 @@ jobs: path: extension/server/exe if: matrix.os == 'windows-latest' + - name: Set permissions + shell: bash + run: | + chmod -R 777 extension/server/exe + # Setup Node.js and install dependencies - name: Use Node.js 19.0.0 diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index c87f1a7b..3cb702ac 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -203,17 +203,18 @@ export async function startContinuePythonServer(redownload: boolean = true) { } ); console.log("Downloaded server executable at ", destination); - // Get name of the corresponding executable for platform - if (os.platform() === "darwin") { - // Add necessary permissions - fs.chmodSync(destination, 0o7_5_5); - await runCommand(`xattr -dr com.apple.quarantine ${destination}`); - } else if (os.platform() === "linux") { - // Add necessary permissions - fs.chmodSync(destination, 0o7_5_5); - } } - + + // Get name of the corresponding executable for platform + if (os.platform() === "darwin") { + // Add necessary permissions + fs.chmodSync(destination, 0o7_5_5); + await runCommand(`xattr -dr com.apple.quarantine ${destination}`); + } else if (os.platform() === "linux") { + // Add necessary permissions + fs.chmodSync(destination, 0o7_5_5); + } + // Validate that the file exists console.log("Looking for file at ", destination); if (!fs.existsSync(destination)) { -- cgit v1.2.3-70-g09d2