code: function exec() {
      var defer = q.defer();
      cp.exec(this, function(err, stdout, stderr) {
          if (err) console.log('exec err: '+ err);
          console.log(stdout);
          defer.resolve(err)
      })
      return defer.promise;
  }
docs: terminal exec task with promise: use as exec.bind(<command>)