Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/error handling #1

Merged
merged 4 commits into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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