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

Update index.js (for debugging purposes)

This commit is contained in:
Minionguyjpro
2024-12-23 13:39:01 +01:00
committed by GitHub
parent 60e69e3826
commit 02233507cb

View File

@@ -23,15 +23,18 @@ 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) {
const escapedOptions = options.map((str) => // Escaping quotes in the options array
str.replace(/(["'])/g, "\\$1"), const escapedOptions = options.map(str => str.replace(/(["'])/g, '\\$1'));
);
// Debugging output to check the escaped options
console.log('Escaped Options:', escapedOptions);
execFile( execFile(
`${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`, `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`,
[...escapedOptions, `${workspacePath}\\${path}`], [...escapedOptions, `${workspacePath}\\${path}`],
(execError, stdout, stderr) => { (execError, stdout, stderr) => {
console.log(stdout); console.log('stdout:', stdout);
console.log('stderr:', stderr);
if (execError) { if (execError) {
core.setFailed(`Execution failed with error: ${stderr}`); core.setFailed(`Execution failed with error: ${stderr}`);
process.exit(execError.code || 1); process.exit(execError.code || 1);