diff --git a/exec.js b/exec.js index bd6a25a..6c00e5a 100644 --- a/exec.js +++ b/exec.js @@ -1,7 +1,6 @@ const {spawn} = require('child_process'); const exec = (cmd, args = [], options = {}) => new Promise((resolve, reject) => { - console.log(`Started: ${cmd} ${args.join(' ')}`); const optionsToCLI = { ...options }; @@ -11,6 +10,7 @@ const exec = (cmd, args = [], options = {}) => new Promise((resolve, reject) => const app = spawn(cmd, args, optionsToCLI); app.on('close', (code) => { if (code !== 0) { + console.log(`Error on: ${cmd} ${args.join(' ')}`); const err = new Error(`Invalid status code: ${code}`); err.code = code; return reject(err);