summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-31 14:20:35 -0400
committerGitHub <noreply@github.com>2021-05-31 14:20:35 -0400
commit983cdd233913cbd2155508dc0f4f452f7cda3626 (patch)
tree2cd587c1ba6d61a82d3e5c6d3babe55a85ac5aee /dev
parent003cf791b1575d2e6e1e6f4bb5cd3d7f77601d7e (diff)
Improve error message when running manifest commands (#1723)
Diffstat (limited to 'dev')
-rw-r--r--dev/manifest-util.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/dev/manifest-util.js b/dev/manifest-util.js
index 25392e13..b872a4c1 100644
--- a/dev/manifest-util.js
+++ b/dev/manifest-util.js
@@ -72,13 +72,14 @@ class ManifestUtil {
_evaluateModificationCommand(data) {
const {command, args, trim} = data;
- const {stdout, status} = childProcess.spawnSync(command, args, {
+ const {stdout, stderr, status} = childProcess.spawnSync(command, args, {
cwd: __dirname,
stdio: 'pipe',
shell: false
});
if (status !== 0) {
- throw new Error(`Failed to execute ${command} ${args.join(' ')}`);
+ const message = stderr.toString('utf8').trim();
+ throw new Error(`Failed to execute ${command} ${args.join(' ')}\nstatus=${status}\n${message}`);
}
let result = stdout.toString('utf8');
if (trim) { result = result.trim(); }