mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Improve zlib error handling. [#109]
Former-commit-id: f6d7dd9afb630125d55188401da037ed97d6e5c5
This commit is contained in:
@@ -63,13 +63,15 @@
|
||||
'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);
|
||||
|
||||
response.pipe(zlib.createUnzip()).pipe(parser);
|
||||
response.pipe(decompressor).pipe(parser);
|
||||
})
|
||||
.on('error', callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user