Merge pull request #278 from acusti/patch-1

When checking for existing wrangler install, match wrangler version even if multiline output
This commit is contained in:
Maximo Guk 2024-10-07 18:38:52 -03:00 committed by GitHub
commit de0526e09b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"wrangler-action": patch
---
fix: Detect existing wrangler install even when wrangler version output is multiline

View file

@ -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];
}