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

Update options logic to prevent conflicts with quotes

This commit is contained in:
Minionguyjpro
2024-12-23 13:10:59 +01:00
committed by GitHub
parent 6f3012b48d
commit 5504a855b3

View File

@@ -6,6 +6,10 @@ const workspacePath = process.env.GITHUB_WORKSPACE;
const options = core.getMultilineInput("options");
const path = core.getInput("path");
const sanitizeArgument = (arg) => {
return arg.replace(/\\"/g, '"');
};
let repoError;
let platformError;
@@ -23,9 +27,11 @@ async function run() {
const workspaceNotEmpty = (await fs.readdir(workspacePath)).length > 0;
if (workspaceExists && workspaceNotEmpty) {
const sanitizedOptions = options.map(sanitizeArgument);
execFile(
`${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`,
[...options, `${workspacePath}\\${path}`],
[...sanitizedOptions, `${workspacePath}\\${path}`],
(execError, stdout, stderr) => {
console.log(stdout);
if (execError) {