1
0
mirror of https://github.com/Minionguyjpro/Inno-Setup-Action synced 2026-02-18 09:31:19 +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 12:26:20 +00:00
parent 508eca1b0a
commit 60e69e3826
2 changed files with 7 additions and 7 deletions

10
dist/index.js vendored
View File

@@ -27314,10 +27314,6 @@ const workspacePath = process.env.GITHUB_WORKSPACE;
const options = core.getMultilineInput("options"); const options = core.getMultilineInput("options");
const path = core.getInput("path"); const path = core.getInput("path");
const sanitizeArgument = (arg) => {
return arg.replace(/\\"/g, '"');
};
let repoError; let repoError;
let platformError; let platformError;
@@ -27335,11 +27331,13 @@ 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 sanitizedOptions = options.map(sanitizeArgument); const escapedOptions = options.map((str) =>
str.replace(/(["'])/g, "\\$1"),
);
execFile( execFile(
`${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`, `${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`,
[...sanitizedOptions, `${workspacePath}\\${path}`], [...escapedOptions, `${workspacePath}\\${path}`],
(execError, stdout, stderr) => { (execError, stdout, stderr) => {
console.log(stdout); console.log(stdout);
if (execError) { if (execError) {

View File

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