diff --git a/index.js b/index.js index dac4752..34dabd8 100644 --- a/index.js +++ b/index.js @@ -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); }