mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-15 15:31:44 +00:00
add additional catch blocks, correct link func
This commit is contained in:
parent
3d303911df
commit
8c950ae5c5
1 changed files with 7 additions and 7 deletions
14
index.js
14
index.js
|
|
@ -28,14 +28,14 @@ try {
|
||||||
if (error && fail_ci) {
|
if (error && fail_ci) {
|
||||||
throw error;
|
throw error;
|
||||||
} else if (error) {
|
} else if (error) {
|
||||||
core.warning(error);
|
core.warning(`Codecov warning: ${error.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFile("codecov.sh", body, err => {
|
fs.writeFile("codecov.sh", body, err => {
|
||||||
if (err && fail_ci) {
|
if (err && fail_ci) {
|
||||||
throw err;
|
throw err;
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
core.warning(err);
|
core.warning(`Codecov warning: ${err.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = "";
|
let output = "";
|
||||||
|
|
@ -104,7 +104,7 @@ try {
|
||||||
)
|
)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
core.warning(
|
core.warning(
|
||||||
`Codecov error warning: ${err.message}`
|
`Codecov warning: ${err.message}`
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -145,7 +145,7 @@ try {
|
||||||
)
|
)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
core.warning(
|
core.warning(
|
||||||
`Codecov error warning: ${err.message}`
|
`Codecov warning: ${err.message}`
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -159,7 +159,7 @@ try {
|
||||||
if (err && fail_ci) {
|
if (err && fail_ci) {
|
||||||
throw err;
|
throw err;
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
core.warning(err);
|
core.warning(`Codecov warning: ${err.message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -167,8 +167,8 @@ try {
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (fail_ci) {
|
if (fail_ci) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(`Codecov failed with the following error: ${error.message}`);
|
||||||
} else {
|
} else {
|
||||||
core.warning(error.message);
|
core.warning(`Codecov warning: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue