set permissions to /exe

This commit is contained in:
Nate Sesti 2023-08-14 17:52:28 -07:00
parent a407c36f89
commit b07e2f2999
2 changed files with 16 additions and 10 deletions

View file

@ -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

View file

@ -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)) {