This commit is contained in:
Tom Hu 2021-07-07 16:50:27 -07:00
parent 9429a7b9ad
commit dd1d2966f2
No known key found for this signature in database
GPG key ID: F7E832BD316D5603
2 changed files with 10 additions and 10 deletions

8
dist/index.js vendored
View file

@ -14704,10 +14704,7 @@ var superagent = __nccwpck_require__(1524);
// const {failCi} = buildExec();
try {
var filename_1 = __dirname + '/uploader';
superagent.get('https://uploader.codecov.io/latest/codecov-linux')["catch"]('error', function (err) {
core.setFailed('Codecov: Could not properly download uploader binary: ' +
("" + err.message));
})
superagent.get('https://uploader.codecov.io/latest/codecov-linux')
.pipe(fs.createWriteStream(filename_1))
.then(function (err, res) {
fs.chmodSync(filename_1, '777');
@ -14724,6 +14721,9 @@ try {
.then(function () {
console.log('finished!');
});
})["catch"](function (err) {
core.setFailed('Codecov: Could not properly download uploader binary: ' +
("" + err.message));
});
}
catch (err) {

View file

@ -12,12 +12,6 @@ const superagent = require('superagent');
try {
const filename = __dirname + '/uploader';
superagent.get('https://uploader.codecov.io/latest/codecov-linux')
.catch('error', (err) => {
core.setFailed(
'Codecov: Could not properly download uploader binary: ' +
`${err.message}`,
);
})
.pipe(fs.createWriteStream(filename))
.then((err, res) => {
fs.chmodSync(filename, '777');
@ -37,6 +31,12 @@ try {
.then(() => {
console.log('finished!');
});
})
.catch((err) => {
core.setFailed(
'Codecov: Could not properly download uploader binary: ' +
`${err.message}`,
);
});
} catch (err) {
core.setFailed(