From 4defc574a8230e81d7a38a7f516609ec0c5cacd1 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 17:16:28 +0000 Subject: [PATCH] Show stderr or stdout if command fails --- src/class/Util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/Util.ts b/src/class/Util.ts index b02284a..cc540d4 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -31,7 +31,7 @@ export default class Util { const res = await ex(command); result = res.stderr || res.stdout; } catch (err) { - throw err; + return `Error: Command failed: ${err.cmd}\n${err.stderr || err.stdout}`; } return result; }