From a1bd340d984d2f47418e3d034cbbb989e502aaab Mon Sep 17 00:00:00 2001 From: Bsian Date: Tue, 12 May 2020 16:21:26 +0100 Subject: [PATCH] Reject with error --- 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 851337d..ae9547e 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -47,7 +47,7 @@ export default class Util { cmd.stdout.removeListener('data', writeFunction); cmd.stderr.removeListener('data', writeFunction); cmd.removeListener('error', writeFunction); - if (error) rej(output); + if (error) rej(new Error(output)); res(output); }); });