Skip to content

Commit

Permalink
vvppエンジンへの実行権限付与にspawnSyncではなくfs.promises.chmodを使うようにする (#1113)
Browse files Browse the repository at this point in the history
  • Loading branch information
y-chan authored Jan 16, 2023
1 parent 21ff141 commit 4a84ac7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/background/vvppManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { dialog } from "electron";
import { EngineInfo, MinimumEngineManifest } from "@/type/preload";
import MultiStream from "multistream";
import glob, { glob as callbackGlob } from "glob";
import { spawnSync } from "child_process";

const isNotWin = process.platform !== "win32";

Expand Down Expand Up @@ -168,9 +167,10 @@ export class VvppManager {
await moveFile(outputDir, engineDirectory);
}
if (isNotWin) {
spawnSync("chmod", ["u+x", manifest.command], {
cwd: engineDirectory,
});
await fs.promises.chmod(
path.join(engineDirectory, manifest.command),
"755"
);
}
}

Expand Down

0 comments on commit 4a84ac7

Please sign in to comment.