mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
remove catch block
This commit is contained in:
12
index.js
12
index.js
@@ -25,6 +25,12 @@ try {
|
||||
}
|
||||
|
||||
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 => {
|
||||
if (err && fail_ci) {
|
||||
throw err;
|
||||
@@ -148,12 +154,6 @@ try {
|
||||
});
|
||||
};
|
||||
});
|
||||
}).catch(err => {
|
||||
if (fail_ci) {
|
||||
core.setFailed(err.message);
|
||||
} else {
|
||||
core.warning(err.message);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
if (fail_ci) {
|
||||
|
||||
Reference in New Issue
Block a user