Skip to content

Commit

Permalink
🔨 Outputting stdout. Lookahead regex fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mountainash authored Mar 11, 2024
1 parent a8a9c28 commit ae0d1ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down Expand Up @@ -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')
Expand Down
2 changes: 2 additions & 0 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion src/vercel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit ae0d1ab

Please sign in to comment.