mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
prettify rem extra catch block
This commit is contained in:
22
dist/index.js
vendored
22
dist/index.js
vendored
@@ -331,12 +331,15 @@ try {
|
|||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
).catch((err)=>{
|
)
|
||||||
core.setFailed(`Codecov failed with the following error ${err}`);
|
.catch(err => {
|
||||||
|
core.setFailed(
|
||||||
|
`Codecov failed with the following error: ${err.message}`
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
exec
|
exec
|
||||||
.exec(
|
.exec(
|
||||||
@@ -353,7 +356,8 @@ try {
|
|||||||
`${yml}`
|
`${yml}`
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -373,8 +377,11 @@ try {
|
|||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
).catch((err)=>{
|
)
|
||||||
core.setFailed(`Codecov failed with the following error ${err}`);
|
.catch(err => {
|
||||||
|
core.setFailed(
|
||||||
|
`Codecov failed with the following error: ${err.message}`
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
@@ -385,7 +392,8 @@ try {
|
|||||||
"bash",
|
"bash",
|
||||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||||
options
|
options
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
22
index.js
22
index.js
@@ -68,12 +68,15 @@ try {
|
|||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
).catch((err)=>{
|
)
|
||||||
core.setFailed(`Codecov failed with the following error ${err}`);
|
.catch(err => {
|
||||||
|
core.setFailed(
|
||||||
|
`Codecov failed with the following error: ${err.message}`
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
exec
|
exec
|
||||||
.exec(
|
.exec(
|
||||||
@@ -90,7 +93,8 @@ try {
|
|||||||
`${yml}`
|
`${yml}`
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -110,8 +114,11 @@ try {
|
|||||||
"-Z"
|
"-Z"
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
).catch((err)=>{
|
)
|
||||||
core.setFailed(`Codecov failed with the following error ${err}`);
|
.catch(err => {
|
||||||
|
core.setFailed(
|
||||||
|
`Codecov failed with the following error: ${err.message}`
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
@@ -122,7 +129,8 @@ try {
|
|||||||
"bash",
|
"bash",
|
||||||
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`],
|
||||||
options
|
options
|
||||||
).then(() => {
|
)
|
||||||
|
.then(() => {
|
||||||
unlinkFile();
|
unlinkFile();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user