Revert "refactor(exec): remove paramsFile (#807)"#819
Merged
Conversation
This reverts commit 64d5899. Reason for revert: If stdin is large, then the param object can become an extremely long string, exceeding the maximum OS size limit on commandline parameters. Original change's description: > refactor(exec): remove paramsFile (#807) > > The `paramsFile` is obsolete now that we use `execFileSync()` for our > internal implementation. Instead, we pass parameters to the child > process directly as a single commandline parameter to reduce file I/O. > > Issue #782 Fixes #818
Member
Author
|
Tested by creating a 6M lorem ipsum file: shell.cat('lorem.txt').exec('tr o a').to('out.txt');
// crashes without this revert |
freitagbr
reviewed
Jan 19, 2018
| } | ||
|
|
||
| var tempDir = _tempDir(); | ||
| var paramsFile = path.resolve(tempDir + '/' + common.randomFileName()); |
Contributor
There was a problem hiding this comment.
This doesn't need to be fixed now, but I think the paths should be joined with path.join, instead of just concatenating the strings... future improvements.
freitagbr
approved these changes
Jan 19, 2018
Member
Author
|
Travis mac builders appear to be stuck. I'm just going to land this, because I'm pretty confident it's safe. |
This was referenced Aug 29, 2019
This was referenced Mar 24, 2020
This was referenced Apr 24, 2020
This file contains hidden or 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
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.
This reverts commit 64d5899.
Reason for revert: If stdin is large, then the param object can become
an extremely long string, exceeding the maximum OS size limit on
commandline parameters.
Original change's description:
Fixes #818