From 5504a855b322b5e53fa8dde453f3f3db7ae7281d Mon Sep 17 00:00:00 2001 From: Minionguyjpro Date: Mon, 23 Dec 2024 13:10:59 +0100 Subject: [PATCH] Update options logic to prevent conflicts with quotes --- src/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 96933c1..c1e339a 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,10 @@ const workspacePath = process.env.GITHUB_WORKSPACE; const options = core.getMultilineInput("options"); const path = core.getInput("path"); +const sanitizeArgument = (arg) => { + return arg.replace(/\\"/g, '"'); +}; + let repoError; let platformError; @@ -23,9 +27,11 @@ async function run() { const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0; if (workspaceExists && workspaceNotEmpty) { + const sanitizedOptions = options.map(sanitizeArgument); + execFile( `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`, - [...options, `${workspacePath}\\${path}`], + [...sanitizedOptions, `${workspacePath}\\${path}`], (execError, stdout, stderr) => { console.log(stdout); if (execError) {