mirror of
https://github.com/Minionguyjpro/Inno-Setup-Action
synced 2026-02-18 17:41:18 +01:00
Update index.js
This commit is contained in:
@@ -6,10 +6,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;
|
||||||
|
|
||||||
@@ -27,11 +23,11 @@ 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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user