Skip to content

Commit

Permalink
Merge pull request #1 from vtex/fix/error-handling
Browse files Browse the repository at this point in the history
Fix/error handling
  • Loading branch information
luizerasmo committed Sep 18, 2018
2 parents 422a39f + fe9cf68 commit c4e5a4c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ module.exports = function (zipPath, opts, cb) {

var cancelled = false

zipfile.on('error', function (err) {
if (err) {
cancelled = true
return cb(err)
}
})

zipfile.readEntry()

zipfile.on('close', function () {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "extract-zip",
"version": "1.6.7",
"name": "@vtex/extract-zip",
"version": "1.7.0",
"description": "unzip a zip file into a directory using 100% javascript",
"main": "index.js",
"bin": {
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Fork motivation

We forked this project in order to solve an error handling issue that was pending for several months in the original project. See [this PR in `builder-hub`](https://github.com/vtex/builder-hub/pull/216) for context.

# extract-zip

Unzip written in pure JavaScript. Extracts a zip into a directory. Available as a library or a command line program.
Expand Down

0 comments on commit c4e5a4c

Please sign in to comment.