From ea3e501fed4479b1e9d415a871466ea446d10ecc Mon Sep 17 00:00:00 2001
From: Anton Golub <antongolub@antongolub.com>
Date: Fri, 4 Aug 2023 21:19:11 +0300
Subject: [PATCH] perf: improve exceptions logging on empty stderr

---
 src/main/ts/runner.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/ts/runner.ts b/src/main/ts/runner.ts
index 0636f830..a760aa45 100644
--- a/src/main/ts/runner.ts
+++ b/src/main/ts/runner.ts
@@ -59,7 +59,7 @@ export const runSync = (_flags: TFlags = {}, _flow?: TFlow): void => {
   } catch (err: any) {
     ctx.err = err
 
-    !flags.silent && console.error((err.stderr?.toString() || err.error || err.status || err))
+    !flags.silent && console.error((err.stderr?.toString() || err.stdout?.toString() || err.error || err.status || err))
     exec(flow.fallback, ctx)
 
     throw err