mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-09 20:47:26 +00:00
await
This commit is contained in:
parent
da5e21fd61
commit
d686463092
2 changed files with 27 additions and 11 deletions
22
dist/index.js
vendored
22
dist/index.js
vendored
|
|
@ -14532,10 +14532,24 @@ console.log('Did it');
|
|||
console.log(fs.readdirSync(__dirname));
|
||||
console.log('files');
|
||||
console.log(__dirname);
|
||||
exec
|
||||
.exec(filename)["catch"](function (err) {
|
||||
core.setFailed("Codecov: Could not properly execute uploader binary: " + err.message);
|
||||
});
|
||||
(function () { return __awaiter(_this, void 0, void 0, function () {
|
||||
var err_2;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
_a.trys.push([0, 2, , 3]);
|
||||
return [4 /*yield*/, exec.exec(filename)];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [3 /*break*/, 3];
|
||||
case 2:
|
||||
err_2 = _a.sent();
|
||||
core.setFailed("Codecov: Could not properly execute uploader binary: " + err_2.message);
|
||||
return [3 /*break*/, 3];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
}); })();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
|
|||
16
src/index.ts
16
src/index.ts
|
|
@ -31,10 +31,12 @@ console.log(fs.readdirSync(__dirname));
|
|||
console.log('files');
|
||||
console.log(__dirname);
|
||||
|
||||
exec
|
||||
.exec(filename)
|
||||
.catch((err) => {
|
||||
core.setFailed(
|
||||
`Codecov: Could not properly execute uploader binary: ${err.message}`,
|
||||
);
|
||||
});
|
||||
(async () => {
|
||||
try {
|
||||
await exec.exec(filename);
|
||||
} catch (err) {
|
||||
core.setFailed(
|
||||
`Codecov: Could not properly execute uploader binary: ${err.message}`,
|
||||
);
|
||||
}
|
||||
})();
|
||||
|
|
|
|||
Loading…
Reference in a new issue