From ae0d1abe51a829b60794f461da840a3998e8df4c Mon Sep 17 00:00:00 2001 From: "Mountain/\\Ash" Date: Mon, 11 Mar 2024 17:26:03 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Outputting=20stdout.=20Lookahead?= =?UTF-8?q?=20regex=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 4 +++- src/helpers.js | 2 ++ src/vercel.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 5a7a52de..9ef6bda7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -32242,6 +32242,8 @@ const execCmd = async (command, args, cwd) => { if (exitCode === 0) throw new Error(`${ stderr } - ${ stdout.trim() }`) + + core.info(stdout) return stdout.trim() } @@ -32344,7 +32346,7 @@ const init = () => { core.info('Starting deploy with Vercel ▲ CLI') const output = await execCmd('vercel', commandArguments, WORKING_DIRECTORY) - const match = output.match(/(?<=https?:\/\/)(.*)/g) + const match = output.match(/(?<=https:\/\/)(.*)/g) const parsed = match ? match[0] : null if (!parsed) throw new Error('🛑 Could not parse deploymentUrl') diff --git a/src/helpers.js b/src/helpers.js index 96bb13b1..b8cfb872 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -21,6 +21,8 @@ const execCmd = async (command, args, cwd) => { if (exitCode === 0) throw new Error(`${ stderr } - ${ stdout.trim() }`) + + core.info(stdout) return stdout.trim() } diff --git a/src/vercel.js b/src/vercel.js index da1cda6f..9ac86d03 100644 --- a/src/vercel.js +++ b/src/vercel.js @@ -72,7 +72,7 @@ const init = () => { core.info('Starting deploy with Vercel ▲ CLI') const output = await execCmd('vercel', commandArguments, WORKING_DIRECTORY) - const match = output.match(/(?<=https?:\/\/)(.*)/g) + const match = output.match(/(?<=https:\/\/)(.*)/g) const parsed = match ? match[0] : null if (!parsed) throw new Error('🛑 Could not parse deploymentUrl')