From cb6bcfcfbf72a09c1878a42194f0f6a556663b93 Mon Sep 17 00:00:00 2001 From: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:42:05 +0100 Subject: [PATCH] try replaceAll --- packages/create-cloudflare/src/helpers/shell-quote.ts | 2 +- packages/wrangler/src/utils/shell-quote.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/create-cloudflare/src/helpers/shell-quote.ts b/packages/create-cloudflare/src/helpers/shell-quote.ts index bd44c7b73ab8..58c1acc28ff4 100644 --- a/packages/create-cloudflare/src/helpers/shell-quote.ts +++ b/packages/create-cloudflare/src/helpers/shell-quote.ts @@ -9,7 +9,7 @@ export function parse(cmd: string, env?: Record): string[] { // We can remove this once we upgrade to a version that includes the fix // tracked by https://github.com/ljharb/shell-quote/issues/10 if (process.platform === "win32") { - cmd = cmd.replace(/\\\\/g, "\\"); + cmd = cmd.replaceAll(/\\\\/g, "\\"); } const entries = shellquote.parse(cmd, env); diff --git a/packages/wrangler/src/utils/shell-quote.ts b/packages/wrangler/src/utils/shell-quote.ts index bd44c7b73ab8..58c1acc28ff4 100644 --- a/packages/wrangler/src/utils/shell-quote.ts +++ b/packages/wrangler/src/utils/shell-quote.ts @@ -9,7 +9,7 @@ export function parse(cmd: string, env?: Record): string[] { // We can remove this once we upgrade to a version that includes the fix // tracked by https://github.com/ljharb/shell-quote/issues/10 if (process.platform === "win32") { - cmd = cmd.replace(/\\\\/g, "\\"); + cmd = cmd.replaceAll(/\\\\/g, "\\"); } const entries = shellquote.parse(cmd, env);