remove catch block

This commit is contained in:
ibrahim0814 2019-12-05 19:44:49 -08:00
parent ade1ebf812
commit 5f55456d46
2 changed files with 12 additions and 12 deletions

12
dist/index.js vendored
View file

@ -288,6 +288,12 @@ try {
} }
request("https://codecov.io/bas", (error, response, body) => { request("https://codecov.io/bas", (error, response, body) => {
if (error && fail_ci) {
throw error;
} else if (error) {
core.warning(error);
}
fs.writeFile("codecov.sh", body, err => { fs.writeFile("codecov.sh", body, err => {
if (err && fail_ci) { if (err && fail_ci) {
throw err; throw err;
@ -411,12 +417,6 @@ try {
}); });
}; };
}); });
}).catch(err => {
if (fail_ci) {
core.setFailed(err.message);
} else {
core.warning(err.message);
}
}); });
} catch (error) { } catch (error) {
if (fail_ci) { if (fail_ci) {

View file

@ -25,6 +25,12 @@ try {
} }
request("https://codecov.io/bas", (error, response, body) => { request("https://codecov.io/bas", (error, response, body) => {
if (error && fail_ci) {
throw error;
} else if (error) {
core.warning(error);
}
fs.writeFile("codecov.sh", body, err => { fs.writeFile("codecov.sh", body, err => {
if (err && fail_ci) { if (err && fail_ci) {
throw err; throw err;
@ -148,12 +154,6 @@ try {
}); });
}; };
}); });
}).catch(err => {
if (fail_ci) {
core.setFailed(err.message);
} else {
core.warning(err.message);
}
}); });
} catch (error) { } catch (error) {
if (fail_ci) { if (fail_ci) {