summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-14 17:52:28 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-14 17:52:28 -0700
commitb07e2f299907989671c63bb5ee100bdc13f45eb5 (patch)
tree6a8c3915ea6763cd54d26a77dd0598dcc9e17895
parenta407c36f89ae7738f6993239b88cd9a2362c1fd7 (diff)
downloadsncontinue-b07e2f299907989671c63bb5ee100bdc13f45eb5.tar.gz
sncontinue-b07e2f299907989671c63bb5ee100bdc13f45eb5.tar.bz2
sncontinue-b07e2f299907989671c63bb5ee100bdc13f45eb5.zip
set permissions to /exe
-rw-r--r--.github/workflows/main.yaml5
-rw-r--r--extension/src/activation/environmentSetup.ts21
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)) {