-
-
Notifications
You must be signed in to change notification settings - Fork 390
Handle partial unzip #773
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
base: main
Are you sure you want to change the base?
Handle partial unzip #773
Conversation
|
Needs a test. And I'm not sure it's correct to just completely silence it. |
|
@sindresorhus do you want me to push a test that covers this scenario? |
|
Yes |
|
Just pushed the test, hope it suits the test structure. |
core.js
Outdated
| return {}; | ||
| } | ||
| }); | ||
| }).catch(() => {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to check if the error caught is an EndOfStreamError error, if not throw the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented as required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Do not throw the
EndOfStreamError()exception in case you pass only partial zip data.Code to reproduce the error:
Stack trace: