Skip to content

Commit

Permalink
Merge pull request #271 from crazy-max/bvake-def-throw-err
Browse files Browse the repository at this point in the history
throw error message instead of exit code when parsing definition
  • Loading branch information
crazy-max authored Nov 22, 2024
2 parents 1417204 + aeaa6df commit 9bc07af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
});

Expand Down

0 comments on commit 9bc07af

Please sign in to comment.