Skip to content

Commit 0531f1b

Browse files
uses stderr content to define error
1 parent 90b87a6 commit 0531f1b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

wrapper/dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4209,7 +4209,7 @@ async function checkStackQL () {
42094209
core.setOutput('stderr', stderr.contents);
42104210
core.setOutput('exitcode', exitCode.toString(10));
42114211

4212-
if (exitCode === 0 || exitCode === 2) {
4212+
if (exitCode === 0 || exitCode === 2 || !stderr.contents) {
42134213
// A exitCode of 0 is considered a success
42144214
// An exitCode of 2 may be returned when the '-detailed-exitcode' option
42154215
// is passed to plan. This denotes Success with non-empty
@@ -4218,7 +4218,7 @@ async function checkStackQL () {
42184218
}
42194219

42204220
// A non-zero exitCode is considered an error
4221-
core.setFailed(`StackQL exited with code ${exitCode}.`);
4221+
core.setFailed(`StackQL exited with error ${stderr.contents}.`);
42224222
})();
42234223

42244224
})();

wrapper/stackql.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async function checkStackQL () {
4141
core.setOutput('stderr', stderr.contents);
4242
core.setOutput('exitcode', exitCode.toString(10));
4343

44-
if (exitCode === 0 || exitCode === 2 || !stderr.contents) {
44+
if ((exitCode === 0 || exitCode === 2) && !stderr.contents) {
4545
// A exitCode of 0 is considered a success
4646
// An exitCode of 2 may be returned when the '-detailed-exitcode' option
4747
// is passed to plan. This denotes Success with non-empty

0 commit comments

Comments
 (0)