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

Update index.js

This commit is contained in:
Minionguyjpro
2023-07-11 16:34:33 +02:00
committed by GitHub
parent 1fe6878ad9
commit 15e498d083

13
dist/index.js vendored
View File

@@ -1,4 +1,6 @@
const fs = require('fs');
const core = require('@actions/core'); const core = require('@actions/core');
// eslint-disable-next-line no-unused-vars
const github = require('@actions/github'); const github = require('@actions/github');
const workspacePath = process.env.GITHUB_WORKSPACE; const workspacePath = process.env.GITHUB_WORKSPACE;
@@ -8,16 +10,15 @@ const path = core.getInput('path');
var exec = require('child_process').exec; var exec = require('child_process').exec;
if (process.platform === 'win32') { if (process.platform === 'win32') {
if (!workspacePath) { if (fs.existsSync(process.env.GITHUB_WORKSPACE)) {
const code = 1;
console.error('Error: The repository was not cloned. Please specify the actions/checkout action before this step.');
process.exit(code);
} else {
console.log(process.env.GITHUB_WORKSPACE);
exec(`"%PROGRAMFILES(X86)%\\Inno Setup 6\\iscc.exe" ${options} "${workspacePath}\\${path}"`, function (error, stdout, stderr) { exec(`"%PROGRAMFILES(X86)%\\Inno Setup 6\\iscc.exe" ${options} "${workspacePath}\\${path}"`, function (error, stdout, stderr) {
console.log(stdout); console.log(stdout);
console.log(stderr); console.log(stderr);
}); });
} else {
const code = 1;
console.error('Error: The repository was not cloned. Please specify the actions/checkout action before this step.');
process.exit(code);
} }
} else { } else {
const code = 1; const code = 1;