From 4147bb66e53995cdb6cb1f41cf0a40a262b02a04 Mon Sep 17 00:00:00 2001 From: Alexey Kotlyarov Date: Tue, 11 Jun 2024 12:06:23 +1000 Subject: [PATCH 1/2] Don't use shell to start process This makes sure the executable name isn't parsed by the shell, avoiding errors when the executable path contains spaces or possibly other special characters. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 47e7f8d..da58728 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,7 +78,7 @@ export async function main(): Promise { console.log("Installed cloudflared to " + (await install(bin))); } - const sub = spawn(bin, args, { shell: true, stdio: "inherit" }); + const sub = spawn(bin, args, { stdio: "inherit" }); sub.on("exit", (code) => { if (typeof code === "number") { From 2dc1efecc538a5bcf169d09e1f72f02d5bb643d5 Mon Sep 17 00:00:00 2001 From: Alexey Kotlyarov Date: Tue, 11 Jun 2024 12:10:10 +1000 Subject: [PATCH 2/2] Changeset --- .changeset/five-chairs-study.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/five-chairs-study.md diff --git a/.changeset/five-chairs-study.md b/.changeset/five-chairs-study.md new file mode 100644 index 0000000..8e16963 --- /dev/null +++ b/.changeset/five-chairs-study.md @@ -0,0 +1,5 @@ +--- +"cloudflared": patch +--- + +Don't use shell to start process