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

Support use of -e flag. #22

Open
jamestalmage opened this issue May 12, 2016 · 3 comments
Open

Support use of -e flag. #22

jamestalmage opened this issue May 12, 2016 · 3 comments

Comments

@jamestalmage
Copy link
Member

See: avajs/ava#815

Specifically: avajs/ava#815 (comment)

This is because that PR makes use of the -e flag to fork a child process. Use of the -e flag causes spawn-wrap to disable wrapping that particular process.

It seems entirely possible that spawn-wrap could support the -e flag when detected by using the vm module, or maybe just simply by using eval.

@bcoe
Copy link
Member

bcoe commented May 13, 2016

@jamestalmage I like this idea, definitely an edge-case that it would be nice for spawn-wrap to handle.

@isaacs
Copy link
Collaborator

isaacs commented Jul 26, 2016

So, what arguments would spawn-wrap pass to the wrapping script if node -e 'console.log("foo")' were invoked, for example?

This module knows nothing about what "wrapping" is involved. Probably the best solution would be to have some function that is passed into the call to spawnWrap() to mutate -e and -p code before passing to the node binary?

@isaacs
Copy link
Collaborator

isaacs commented Jul 26, 2016

Oh, but that won't work, will it? Because it has to survive different child processes, of course, duh. (I helped write this module, but forget how it works sometimes.)

Maybe just some option to say "invoke -e/-p arguments using the script as well, and trust that we'll handle it"?

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

No branches or pull requests

3 participants