Skip to content

Commit

Permalink
update status handling
Browse files Browse the repository at this point in the history
  • Loading branch information
devalex88 committed Jul 7, 2020
1 parent a12f271 commit b3cf518
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@ const user_projectPath = core.getInput("projectPath");
const user_args = core.getInput("args");

try {
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}.`);
}
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);
},
})
.then((status) => {
if (status !== 0) {
core.setFailed(`Exit code ${status}.`);
}
})
.catch((err) => {
console.error(err);
core.setFailed(err);
});
} catch (error) {
console.error(error);
core.setFailed(error.message);
}

0 comments on commit b3cf518

Please sign in to comment.