From 8c9ff3249e177c10ae69cc4136a4647c9f8587b5 Mon Sep 17 00:00:00 2001 From: Webber Date: Thu, 21 May 2020 20:13:33 +0200 Subject: [PATCH] More info if command gives no output, just the exit code. --- src/model/system.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/model/system.js b/src/model/system.js index 3e9a4851..597a20ad 100644 --- a/src/model/system.js +++ b/src/model/system.js @@ -34,7 +34,12 @@ class System { } if (exitCode !== 0) { - throw new Error(error); + let argumentsString = ''; + if (Array.isArray(arguments_)) { + argumentsString += ` ${arguments_.join(' ')}`; + } + + throw new Error(`Failed to run "${command}${argumentsString}".\n ${error}`); } return result;