Skip to content

Commit

Permalink
try replaceAll
Browse files Browse the repository at this point in the history
  • Loading branch information
RamIdeas committed Oct 4, 2023
1 parent 5c4d843 commit cb6bcfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/create-cloudflare/src/helpers/shell-quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function parse(cmd: string, env?: Record<string, string>): 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);
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/utils/shell-quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function parse(cmd: string, env?: Record<string, string>): 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, "\\");

Check warning on line 12 in packages/wrangler/src/utils/shell-quote.ts

View check run for this annotation

Codecov / codecov/patch

packages/wrangler/src/utils/shell-quote.ts#L12

Added line #L12 was not covered by tests
}

const entries = shellquote.parse(cmd, env);
Expand Down

0 comments on commit cb6bcfc

Please sign in to comment.