From ff15a5d6e38fdc1b887bcb7ac169be7b28d870e0 Mon Sep 17 00:00:00 2001 From: Skyf0l Date: Sat, 14 Oct 2023 00:37:00 +0200 Subject: [PATCH] try package :) --- dist/index.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 07f93978..b0b4dc01 100644 --- a/dist/index.js +++ b/dist/index.js @@ -32637,6 +32637,8 @@ function addVercelMetadata(key, value, providedArgs) { } async function vercelDeploy(ref, commit) { + core.info('Does it really enter here ????????????????????????'); + let myOutput = ''; // eslint-disable-next-line no-unused-vars let myError = ''; @@ -32656,10 +32658,20 @@ async function vercelDeploy(ref, commit) { options.cwd = workingDirectory; } - const providedArgs = vercelArgs.split(/ +/); + const argRegex = /[^\s"']+|"([^"]*)"|'([^']*)'/gm; + const providedArgs = []; + core.info("BEGIN ARGS"); + for (const match of vercelArgs.matchAll(argRegex)) { + // This removes the quotes from the captured group if they are present, otherwise it leaves the match as is + providedArgs.push(match[1] ?? match[0]); + core.info("=>", match[1] ?? match[0]); + } + core.info("=> ARGS"); + core.info(providedArgs); + core.info("END ARGS"); const args = [ - ...vercelArgs.split(/ +/), + ...providedArgs, ...['-t', vercelToken], ...addVercelMetadata('githubCommitSha', context.sha, providedArgs), ...addVercelMetadata('githubCommitAuthorName', context.actor, providedArgs), @@ -32887,6 +32899,7 @@ async function aliasDomainsToDeployment(deploymentUrl) { } async function run() { + core.info('Does it really run ????????????????????????'); core.debug(`action : ${context.action}`); core.debug(`ref : ${context.ref}`); core.debug(`eventName : ${context.eventName}`);