From 4c849bee6fc2d557c7b2b564a9f498e4f0dfc83f Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Thu, 13 Aug 2020 22:18:36 +0200 Subject: [PATCH] fix: reference error in error handling clause This masks whatever error was actually occurring in #2003. I'll leave that issue open until we get more info there. --- core/src/util/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/util/util.ts b/core/src/util/util.ts index 4f6ab8c54a..0cca6ebd19 100644 --- a/core/src/util/util.ts +++ b/core/src/util/util.ts @@ -182,7 +182,7 @@ export async function exec(cmd: string, args: string[], opts: ExecOpts = {}) { cmd, args, code: error.exitCode, - output: error.all || error.stdout, + output: error.all || error.stdout || error.stderr || "", error: error.stderr, }) error.message = message @@ -310,7 +310,7 @@ export function spawn(cmd: string, args: string[], opts: SpawnOpts = {}) { code, cmd, args, - output: result.all, + output: result.all || result.stdout || result.stderr || "", error: result.stderr || "", }) _reject(new RuntimeError(msg, { cmd, args, opts, result }))