Cleanup build/post-install.js.

Former-commit-id: 5e289381b90e764b38bf5a3ba1866b6658766f52
This commit is contained in:
John-David Dalton
2012-11-10 21:09:50 -08:00
parent bd00fcb875
commit 3a68f4cf54

View File

@@ -63,14 +63,11 @@
'Accept': 'application/vnd.github.v3.raw'
}
}, function(response) {
var decompressor = zlib.createUnzip().on('error', callback);
var parser = new tar.Extract({
'path': options.path
})
.on('end', callback)
.on('error', callback);
var decompressor = zlib.createUnzip(),
parser = new tar.Extract({ 'path': options.path });
decompressor.on('error', callback)
parser.on('end', callback).on('error', callback);
response.pipe(decompressor).pipe(parser);
})
.on('error', callback);