diff --git a/lib/print-error.js b/lib/print-error.js index 84aaa8257..bdafa77ef 100644 --- a/lib/print-error.js +++ b/lib/print-error.js @@ -1,7 +1,7 @@ const chalk = require('chalk') module.exports = function (args, msg, opts) { - if (!args.silent) { + if (!args.silent || args.printError) { opts = Object.assign({ level: 'error', color: 'red' diff --git a/lib/run-exec.js b/lib/run-exec.js index eec2feb3d..51ffde7c7 100644 --- a/lib/run-exec.js +++ b/lib/run-exec.js @@ -12,7 +12,7 @@ module.exports = async function (args, cmd) { return stdout } catch (error) { // If exec returns an error, print it and exit with return code 1 - printError(args, error.stderr || error.message) + printError(args, error.stderr || error.stdout || error.message) throw error } }