mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-13 22:47:25 +00:00
add catch block
This commit is contained in:
parent
cf0e744e2c
commit
fc0e9fde50
2 changed files with 26 additions and 10 deletions
18
dist/index.js
vendored
18
dist/index.js
vendored
|
|
@ -331,10 +331,12 @@ try {
|
||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
exec
|
exec
|
||||||
.exec(
|
.exec(
|
||||||
|
|
@ -351,7 +353,9 @@ try {
|
||||||
`${yml}`
|
`${yml}`
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
|
|
@ -372,7 +376,9 @@ try {
|
||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
|
|
@ -382,7 +388,9 @@ try {
|
||||||
"bash",
|
"bash",
|
||||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
18
index.js
18
index.js
|
|
@ -68,10 +68,12 @@ try {
|
||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
exec
|
exec
|
||||||
.exec(
|
.exec(
|
||||||
|
|
@ -88,7 +90,9 @@ try {
|
||||||
`${yml}`
|
`${yml}`
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
|
|
@ -109,7 +113,9 @@ try {
|
||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
|
|
@ -119,7 +125,9 @@ try {
|
||||||
"bash",
|
"bash",
|
||||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||||
options
|
options
|
||||||
)
|
).catch((err)=>{
|
||||||
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue