throw error message instead of exit code when parsing definition

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-11-22 09:05:03 +01:00
parent 1417204e8d
commit 63fc7d13b7

View File

@@ -126,9 +126,14 @@ actionsToolkit.run(
};
await core.group(`Bake definition`, async () => {
await Exec.exec(buildCmd.command, [...buildCmd.args, '--print'], {
await Exec.getExecOutput(buildCmd.command, [...buildCmd.args, '--print'], {
cwd: inputs.workdir,
env: buildEnv
env: buildEnv,
ignoreReturnCode: true
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw Error(res.stderr);
}
});
});