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

[AUTO]Update CJS script

Files changed:
M	dist/index.js
M	src/index.js
This commit is contained in:
github-actions[bot]
2024-12-23 14:17:38 +00:00
parent 3574c46440
commit af7bd46ac4
2 changed files with 5 additions and 9 deletions

9
dist/index.js vendored
View File

@@ -27331,20 +27331,15 @@ 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) {
// Escaping quotes in the options array
const escapedOptions = options.map((str) => const escapedOptions = options.map((str) =>
str.replace(/(["'])/g, "\\$1"), 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:", stdout); console.log(stdout, stderr);
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);

View File

@@ -23,8 +23,9 @@ 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) =>
const escapedOptions = options.map(str => str.replace(/(["'])/g, '$1')); str.replace(/(["'])/g, "$1"),
);
execFile( execFile(
`${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`, `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`,