1
0
mirror of https://github.com/Minionguyjpro/Inno-Setup-Action synced 2026-02-18 17:41:18 +01:00

Update index.js (restore to normal)

This commit is contained in:
Minionguyjpro
2024-12-23 11:35:44 +01:00
committed by GitHub
parent 5db03e2470
commit 25e5b5efed

View File

@@ -23,21 +23,17 @@ async function run() {
const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0; const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0;
if (workspaceExists && workspaceNotEmpty) { if (workspaceExists && workspaceNotEmpty) {
// Capture the entire command as a string execFile(
const command = `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`; `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`,
const commandArgs = [...options, `${workspacePath}\\${path}`]; [...options, `${workspacePath}\\${path}`],
const fullCommand = `${command} ${commandArgs.join(" ")}`; (execError, stdout, stderr) => {
console.log(stdout);
// Log the full command being executed if (execError) {
console.log(`Executing command: ${fullCommand}`); core.setFailed(`Execution failed with error: ${stderr}`);
process.exit(execError.code || 1);
execFile(command, commandArgs, (execError, stdout, stderr) => { }
console.log(stdout); },
if (execError) { );
core.setFailed(`Execution failed with error: ${stderr}`);
process.exit(execError.code || 1);
}
});
} else { } else {
throw new Error( throw new Error(
"The repository was not cloned. Please specify the actions/checkout action before this step.", "The repository was not cloned. Please specify the actions/checkout action before this step.",