From acf6db96dad7fbc1440db4b8717c913ddc1f88d3 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 30 Oct 2019 17:34:02 +0000 Subject: [PATCH] Actually reject --- 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 cc540d4..1398782 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) { - return `Error: Command failed: ${err.cmd}\n${err.stderr || err.stdout}`; + return Promise.reject(new Error(`Command failed: ${err.cmd}\n${err.stderr || err.stdout}`)); } return result; }