From 47d51f25c113ee9205110728599b43ed6a1e273b Mon Sep 17 00:00:00 2001 From: Andrew Patton Date: Thu, 11 Jul 2024 11:34:09 -0700 Subject: [PATCH] Match wrangler version even if multiline output cloudflare#277 --- .changeset/gentle-cobras-move.md | 5 +++++ src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/gentle-cobras-move.md diff --git a/.changeset/gentle-cobras-move.md b/.changeset/gentle-cobras-move.md new file mode 100644 index 0000000..75a60cd --- /dev/null +++ b/.changeset/gentle-cobras-move.md @@ -0,0 +1,5 @@ +--- +"wrangler-action": patch +--- + +fix: Detect existing wrangler install even when wrangler version output is multiline diff --git a/src/index.ts b/src/index.ts index 6d9b3a5..df8856e 100755 --- a/src/index.ts +++ b/src/index.ts @@ -104,7 +104,7 @@ async function installWrangler() { // `3.48.0` const versionMatch = stdout.match(/wrangler (\d+\.\d+\.\d+)/) ?? - stdout.match(/^(\d+\.\d+\.\d+)/); + stdout.match(/^(\d+\.\d+\.\d+)/m); if (versionMatch) { installedVersion = versionMatch[1]; }