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

Improve passing data to forked processes #318

Closed
sindresorhus opened this issue Dec 9, 2015 · 3 comments · Fixed by #319
Closed

Improve passing data to forked processes #318

sindresorhus opened this issue Dec 9, 2015 · 3 comments · Fixed by #319
Labels

Comments

@sindresorhus
Copy link
Member

From: #296 (comment)

Currently we just proxy the CLI args manually. We should instead just JSON.stringify all the data we want to pass and pass it as the only argument.

@vadimdemedes
Copy link
Contributor

Or we could just pass process.argv.slice(2) to the fork process?

@sindresorhus
Copy link
Member Author

@vdemedes Sure, but now all the places we use those things have to do an additional argument parsing. Even worse when we want to send arrays and more complex data structures down to the child process, like with the --require PR. Would be much nicer if anywhere we wanted to use the info from the parent process we could just JSON.parse(process.argv[2]).

@vadimdemedes
Copy link
Contributor

Either way is good for me ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants