mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
add catch block
This commit is contained in:
18
dist/index.js
vendored
18
dist/index.js
vendored
@@ -331,10 +331,12 @@ try {
|
||||
"-Z"
|
||||
],
|
||||
options
|
||||
)
|
||||
).catch((err)=>{
|
||||
core.setFailed(`Action failed with error ${err}`);
|
||||
})
|
||||
.then(() => {
|
||||
unlinkFile();
|
||||
});
|
||||
})
|
||||
} else {
|
||||
exec
|
||||
.exec(
|
||||
@@ -351,7 +353,9 @@ try {
|
||||
`${yml}`
|
||||
],
|
||||
options
|
||||
)
|
||||
).catch((err)=>{
|
||||
core.setFailed(`Action failed with error ${err}`);
|
||||
})
|
||||
.then(() => {
|
||||
unlinkFile();
|
||||
});
|
||||
@@ -372,7 +376,9 @@ try {
|
||||
"-Z"
|
||||
],
|
||||
options
|
||||
)
|
||||
).catch((err)=>{
|
||||
core.setFailed(`Action failed with error ${err}`);
|
||||
})
|
||||
.then(() => {
|
||||
unlinkFile();
|
||||
});
|
||||
@@ -382,7 +388,9 @@ try {
|
||||
"bash",
|
||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||
options
|
||||
)
|
||||
).catch((err)=>{
|
||||
core.setFailed(`Action failed with error ${err}`);
|
||||
})
|
||||
.then(() => {
|
||||
unlinkFile();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user