headcr4sh / node-maven

Maven for Node.js
Apache License 2.0
18 stars 14 forks source link

I need to report errors in gulp script. Can I rely on `execute` returning Promise in further versions of the module? #4

Closed KonstantinSviridov closed 8 years ago

KonstantinSviridov commented 8 years ago

Hi guys.

I am running the module in a gulp script and, thus, have the need to report failures. As the execute method returns Promise, I can handle it as

gulp.task('java:build', [],function (done) {
  var mvn = maven.create();
  return mvn.execute(['clean', 'install']).then(
      function(x){},
      function(err){
         throw new Error("Compilation failed");
      });
});

The execute return type is not documented, so I have a question: do you have plans of changing it?

Regards, Konstantin.

headcr4sh commented 8 years ago

I do NOT plan to change the return type. Even though it is not (yet) documented, the API shall stay Promise-based.

KonstantinSviridov commented 8 years ago

Thanks!