-
Notifications
You must be signed in to change notification settings - Fork 2
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
Don't use exec() for file #42
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I see the lint error but I don't know what the idiom is to make it go away. |
Arrow functions with no arguments have the syntax of |
Thanks -- I knew it had to be something obvious. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: This PR is built on top of #41 ! Merge that first.
I've written a little utility to pipe the output of unzip/untar into file.
This uses the Node event-driven file-stream API. All the output of
unzip -p xxx.zip file
goes through the unbox process. But we don't store it all, not even in memory. It's just passed along chunk by chunk.(The stdout/stderr output of file does get accumulated in memory. But that's tiny.)
Now, the bad news: this doesn't fix the problems that I originally thought it would fix. In #39 , I mentioned two files causing errors:
Icon^M
etc)agent_4F[1].A.taf
)Turns out these are not shell bugs. They are mismatches between what unzip reports in its file list and what it accepts as a filename. Oh well!
(I recognize the
Icon^M
thing. It's a MacOS Classic convention where a folder icon appeared in the filesystem with that filename, yes, with a ctrl-M in it. Everybody hated that.)Anyhow, this spurred me into cleaning up the exec() situation, and I'm very happy about that. I think my implementation is correct. It's possible I missed something; I still haven't spent a lot of time in async-node-land.