Skip to content

Commit

Permalink
Match wrangler version even if multiline output cloudflare#277
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Oct 7, 2024
1 parent 93fff4f commit 47d51f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gentle-cobras-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler-action": patch
---

fix: Detect existing wrangler install even when wrangler version output is multiline
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 47d51f2

Please sign in to comment.