From 624b4239bcecd5273ae91a4b13b27e9d1dd74d82 Mon Sep 17 00:00:00 2001 From: Minionguyjpro Date: Mon, 11 Dec 2023 16:56:45 +0100 Subject: [PATCH] Update index.js --- dist/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 1de36c4..235fbf6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9,6 +9,8 @@ const path = core.getInput('path'); var exec = require('child_process').exec; +let error; + if (process.platform === 'win32') { if (fs.existsSync(process.env.GITHUB_WORKSPACE) && fs.readdirSync(workspacePath).length > 0) { exec(`"%PROGRAMFILES(X86)%\\Inno Setup 6\\iscc.exe" ${options} "${workspacePath}\\${path}"`, { stdio: 'ignore' }, function (error, stdout, stderr) { @@ -19,12 +21,12 @@ if (process.platform === 'win32') { } }); } else { - error.code = 1; + error = { code: 1 } core.setFailed('Error: The repository was not cloned. Please specify the actions/checkout action before this step.'); process.exit(error.code); } } else { - error.code = 1; + error = { code: 1 }; core.setFailed('Error: This action is only supported on Windows!'); process.exit(error.code); }