Skip to content

Commit

Permalink
[fix] expect a stream of the build server logs in the callback from c…
Browse files Browse the repository at this point in the history
…reate and pipe that shit to stdout
  • Loading branch information
jcrugzz committed Mar 4, 2014
1 parent d14e96d commit 146ea85
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/jitsu/package.js
Expand Up @@ -429,9 +429,15 @@ package.updateTarball = function (version, pkg, existing, firstSnapshot, callbac
jitsu.log.warn('This is not recommended practice.');
}

var emitter = jitsu.snapshots.create(pkg.name, version, filename, function (err, snapshots) {
jitsu.log.silly('Done creating snapshot ' + version.magenta);
return err ? callback(err) : callback(null, version, pkg);
var emitter = jitsu.snapshots.create(pkg.name, version, filename, function (err, res) {
if (err) {
return callback(err);
}
res.pipe(process.stdout);
res.on('end', function () {
jitsu.log.silly('Done creating snapshot ' + version.magenta);
callback(null, version, pkg);
})
});

if (emitter && !jitsu.config.get('raw') && process.stdout.isTTY ) {
Expand Down

0 comments on commit 146ea85

Please sign in to comment.