mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
add additional catch blocks, correct link func
This commit is contained in:
12
dist/index.js
vendored
12
dist/index.js
vendored
@@ -365,6 +365,11 @@ try {
|
|||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
|
.catch(err => {
|
||||||
|
core.warning(
|
||||||
|
`Codecov error warning: ${err.message}`
|
||||||
|
);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
@@ -401,6 +406,11 @@ try {
|
|||||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
|
.catch(err => {
|
||||||
|
core.warning(
|
||||||
|
`Codecov error warning: ${err.message}`
|
||||||
|
);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
@@ -408,7 +418,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const unlinkFile = () => {
|
const unlinkFile = () => {
|
||||||
fs.unlink("codeco.sh", err => {
|
fs.unlink("codecov.sh", err => {
|
||||||
if (err && fail_ci) {
|
if (err && fail_ci) {
|
||||||
throw err;
|
throw err;
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
|
|||||||
12
index.js
12
index.js
@@ -102,6 +102,11 @@ try {
|
|||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
|
.catch(err => {
|
||||||
|
core.warning(
|
||||||
|
`Codecov error warning: ${err.message}`
|
||||||
|
);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
@@ -138,6 +143,11 @@ try {
|
|||||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
|
.catch(err => {
|
||||||
|
core.warning(
|
||||||
|
`Codecov error warning: ${err.message}`
|
||||||
|
);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
@@ -145,7 +155,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const unlinkFile = () => {
|
const unlinkFile = () => {
|
||||||
fs.unlink("codeco.sh", err => {
|
fs.unlink("codecov.sh", err => {
|
||||||
if (err && fail_ci) {
|
if (err && fail_ci) {
|
||||||
throw err;
|
throw err;
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user