From 4087cb30fc0933b51f921ab6dbb9f3d9a9fe5479 Mon Sep 17 00:00:00 2001 From: Minionguyjpro Date: Mon, 23 Dec 2024 11:22:25 +0100 Subject: [PATCH] Temporary change in index.js (for debugging purposes) --- src/index.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/index.js b/src/index.js index 96933c1..44c8188 100644 --- a/src/index.js +++ b/src/index.js @@ -23,17 +23,21 @@ async function run() { const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0; if (workspaceExists && workspaceNotEmpty) { - execFile( - `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`, - [...options, `${workspacePath}\\${path}`], - (execError, stdout, stderr) => { - console.log(stdout); - if (execError) { - core.setFailed(`Execution failed with error: ${stderr}`); - process.exit(execError.code || 1); - } - }, - ); + // Capture the entire command as a string + const command = `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`; + const commandArgs = [...options, `${workspacePath}\\${path}`]; + const fullCommand = `${command} ${commandArgs.join(" ")}`; + + // Log the full command being executed + console.log(`Executing command: ${fullCommand}`); + + execFile(command, commandArgs, (execError, stdout, stderr) => { + console.log(stdout); + if (execError) { + core.setFailed(`Execution failed with error: ${stderr}`); + process.exit(execError.code || 1); + } + }); } else { throw new Error( "The repository was not cloned. Please specify the actions/checkout action before this step.",