Skip to content
Permalink
Browse files

[fix] check trailers to correctly output an error and replicate how e…

…rrors output themselves
  • Loading branch information...
jcrugzz committed Mar 6, 2014
1 parent 7d51442 commit 4fec94126a8d77853136744abe67666d85abd06b
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/jitsu/package.js
@@ -436,7 +436,9 @@ package.updateTarball = function (version, pkg, existing, firstSnapshot, callbac
res.pipe(process.stdout);
res.on('end', function () {
if (res.trailers['x-build-failure']) {
return callback(new Error(res.trailers['x-build-failure']));
var error = new Error('Nodejitsu Error: Build Failure, Check your dependencies');
error.result = { error: res.trailers['x-npm-failure'] };
return callback(error);
}
jitsu.log.silly('Done creating snapshot ' + version.magenta);
callback(null, version, pkg);

0 comments on commit 4fec941

Please sign in to comment.
You can’t perform that action at this time.