-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
How to get notified when done extracting? #9
Comments
I worked out I need to listen for the fs.createReadStream('./my-file.tar')
.pipe(
tar.extract('./my-dir')
.on('finish', function () {
console.log('DONE!');
})
)
.on('error', function (err) {
console.error('ERROR', err);
})
.on('end', function () {
console.log('THIS NEVER FIRES');
}); The original stream's |
The extract stream does not emit |
? but |
doh. I meant: The extract stream does not emit end since it's a writable stream. The pack stream emits end though (since its readable) |
ah cool :) so this is right then |
I can't get the "DONE!" to print out here (even though tar-fs successfully extracts the whole tar):
I've also tried listening for
finish
instead ofend
(as I saw that name used in your tests) but that doesn't work either. Not sure what I'm doing...The text was updated successfully, but these errors were encountered: