mirror of
https://github.com/actions/setup-python
synced 2025-04-07 15:59:43 +00:00
Fail on error
This commit is contained in:
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user