Fail on error
This commit is contained in:
parent
b96ef7391c
commit
04b8867918
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -5,26 +5,26 @@
|
|||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-core-0.0.0.tgz",
|
||||
"version": "file:../setup-node/toolkit/actions-core-0.0.0.tgz",
|
||||
"integrity": "sha512-58ituSV1rzBMmmsWoFDnrnsT+Wm4kD/u9NgAGbPvZ7rQHWluYtD5bDbIsjDC6rKFuhqytkxDJPsF/TWBdgc/nA==",
|
||||
"requires": {
|
||||
"@actions/exit": "^0.0.0"
|
||||
}
|
||||
},
|
||||
"@actions/exec": {
|
||||
"version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-exec-0.0.0.tgz",
|
||||
"version": "file:../setup-node/toolkit/actions-exec-0.0.0.tgz",
|
||||
"integrity": "sha512-HHObusC4p1RElxIlrrN0sY/cweBYl+jKm3J/XWHPQZMipgJXB/dkVhUfl4KqH3Vim7oM2KjCGSfn+vTYrqVH3A=="
|
||||
},
|
||||
"@actions/exit": {
|
||||
"version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-exit-0.0.0.tgz",
|
||||
"version": "file:../setup-node/toolkit/actions-exit-0.0.0.tgz",
|
||||
"integrity": "sha512-vQdxFWM0/AERkC79mQ886SqPmV4joWhrSF7hiSTiJoKkE9eTjrKV5WQtp7SXv6OntrQkKX+ZjgdGpv+0rvJRCw=="
|
||||
},
|
||||
"@actions/io": {
|
||||
"version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-io-0.0.0.tgz",
|
||||
"version": "file:../setup-node/toolkit/actions-io-0.0.0.tgz",
|
||||
"integrity": "sha512-BArfobXB/b6RjR4i/+P4UcdaqR2tPjEb2WzZf9GdKiSARQn7d301pKOZAqxA+0N11X07Lk46t/txeUBcrCNbeg=="
|
||||
},
|
||||
"@actions/tool-cache": {
|
||||
"version": "file:../../../damccorm/Documents/setup-node/toolkit/actions-tool-cache-0.0.0.tgz",
|
||||
"version": "file:../setup-node/toolkit/actions-tool-cache-0.0.0.tgz",
|
||||
"integrity": "sha512-NavDg5VFXDfbe9TpFuj+uOHacjg1bT3Wmo3DQuul3gsGRBEXyzhh2MWKnBZs/Zh7FE3prLmIqpbtymafNBFkIA==",
|
||||
"requires": {
|
||||
"@actions/core": "^0.0.0",
|
||||
|
@ -1774,7 +1774,8 @@
|
|||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -1795,12 +1796,14 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -1815,17 +1818,20 @@
|
|||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -1942,7 +1948,8 @@
|
|||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -1954,6 +1961,7 @@
|
|||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -1968,6 +1976,7 @@
|
|||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
@ -1975,12 +1984,14 @@
|
|||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.3.5",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -1999,6 +2010,7 @@
|
|||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
@ -2079,7 +2091,8 @@
|
|||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -2091,6 +2104,7 @@
|
|||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -2176,7 +2190,8 @@
|
|||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -2212,6 +2227,7 @@
|
|||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -2231,6 +2247,7 @@
|
|||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -2274,12 +2291,14 @@
|
|||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.0.3",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,10 +2,14 @@ import * as core from '@actions/core';
|
|||
import * as finder from './find-python';
|
||||
|
||||
async function run() {
|
||||
const version: string = core.getInput('version');
|
||||
if (version) {
|
||||
const arch: string = core.getInput('architecture', {required: true});
|
||||
await finder.findPythonVersion(version, arch);
|
||||
try {
|
||||
const version: string = core.getInput('version');
|
||||
if (version) {
|
||||
const arch: string = core.getInput('architecture', {required: true});
|
||||
await finder.findPythonVersion(version, arch);
|
||||
}
|
||||
} catch (err) {
|
||||
core.setFailed(err.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue