Skip to content

Commit

Permalink
Add quotes for execPath strings (Danny-Dasilva#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlshv authored Jul 15, 2024
1 parent e0b0907 commit 058a3ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ process.on("SIGINT", () => cleanExit());
process.on("SIGTERM", () => cleanExit());

const handleSpawn = (debug: boolean, fileName: string, port: number, filePath?: string) => {
const execPath = filePath ?? path.join(__dirname, fileName);
const execPath = filePath ? `"${filePath}"` : `"${path.join(__dirname, fileName)}"`;
child = spawn(execPath, {
env: { WS_PORT: port.toString() },
shell: true,
Expand Down

0 comments on commit 058a3ae

Please sign in to comment.