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; }