Move error to correct catch block

This commit is contained in:
Max Veytsman 2020-04-30 09:11:50 -04:00
parent f237316c5a
commit 7963db13d8
2 changed files with 4 additions and 4 deletions

4
lib/autobuild.js generated
View file

@ -48,13 +48,13 @@ async function run() {
core.endGroup();
}
catch (error) {
core.setFailed(error.message);
core.setFailed("We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. " + error.message);
await util.reportActionFailed('autobuild', error.message, error.stack);
return;
}
await util.reportActionSucceeded('autobuild');
}
run().catch(e => {
core.setFailed("We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. codeql/autobuild action failed. " + e);
core.setFailed("autobuild action failed. " + e);
console.log(e);
});

View file

@ -49,7 +49,7 @@ async function run() {
core.endGroup();
} catch (error) {
core.setFailed(error.message);
core.setFailed("We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. " + error.message);
await util.reportActionFailed('autobuild', error.message, error.stack);
return;
}
@ -58,6 +58,6 @@ async function run() {
}
run().catch(e => {
core.setFailed("We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. codeql/autobuild action failed. " + e);
core.setFailed("autobuild action failed. " + e);
console.log(e);
});