Skip to content

Commit

Permalink
set build as failed when status !== 0
Browse files Browse the repository at this point in the history
  • Loading branch information
devalex88 committed Jul 7, 2020
1 parent ad57733 commit a12f271
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,28 @@ const user_projectPath = core.getInput("projectPath");
const user_args = core.getInput("args");

try {
execute(user_version, "", user_projectPath, user_args, "", "", {
info: function (message) {
console.log(message);
},
debug: function (message) {
console.log(message);
},
error: function (message) {
console.error(message);
},
});
const status = await execute(
user_version,
"",
user_projectPath,
user_args,
"",
"",
{
info: function (message) {
console.log(message);
},
debug: function (message) {
console.log(message);
},
error: function (message) {
console.error(message);
},
}
);
if (status !== 0) {
core.setFailed(`Exit code ${status}.`);
}
} catch (error) {
core.setFailed(error.message);
}

0 comments on commit a12f271

Please sign in to comment.