code: function runCommand(command, fail, log) {
    return new Promise(function(resolve, reject) {
        if (!command) {
          return resolve('No command found');
        }
  
        log(command);
  
        var task = exec(command, {
          cwd: process.cwd()
        }, function(err, stdout, stderr) {
          log(stdout);
  
          if (err) {
            log(stderr, { color: 'red' });
          }
        });
  
        task.on('exit', function(code) {
          if (code !== 0 && fail) {
            reject(code);
          }
  
          resolve(command);
          process.stdin.end();
        });
  
        process.stdin.pipe(task.stdin, { end: false });
      });
  }
docs: @method runCommand
  
  @param {String} command The command to be run
  @param {Object} log The interface that handles stdin/stdout