Fail on error

This commit is contained in:
Danny McCormick
2019-07-03 14:04:51 -04:00
parent b96ef7391c
commit 04b8867918
3 changed files with 52 additions and 24 deletions

View File

@ -19,10 +19,15 @@ const core = __importStar(require("@actions/core"));
const finder = __importStar(require("./find-python"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
const version = core.getInput('version');
if (version) {
const arch = core.getInput('architecture', { required: true });
yield finder.findPythonVersion(version, arch);
try {
const version = core.getInput('version');
if (version) {
const arch = core.getInput('architecture', { required: true });
yield finder.findPythonVersion(version, arch);
}
}
catch (err) {
core.setFailed(err.message);
}
});
}