Skip to content

Commit 9bc07af

Browse files
authored
Merge pull request #271 from crazy-max/bvake-def-throw-err
throw error message instead of exit code when parsing definition
2 parents 1417204 + aeaa6df commit 9bc07af

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,14 @@ actionsToolkit.run(
126126
};
127127

128128
await core.group(`Bake definition`, async () => {
129-
await Exec.exec(buildCmd.command, [...buildCmd.args, '--print'], {
129+
await Exec.getExecOutput(buildCmd.command, [...buildCmd.args, '--print'], {
130130
cwd: inputs.workdir,
131-
env: buildEnv
131+
env: buildEnv,
132+
ignoreReturnCode: true
133+
}).then(res => {
134+
if (res.stderr.length > 0 && res.exitCode != 0) {
135+
throw Error(res.stderr);
136+
}
132137
});
133138
});
134139

0 commit comments

Comments
 (0)