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

Make shims location configurable through environment #49

Closed
gautaz opened this issue Mar 3, 2017 · 4 comments
Closed

Make shims location configurable through environment #49

gautaz opened this issue Mar 3, 2017 · 4 comments

Comments

@gautaz
Copy link

gautaz commented Mar 3, 2017

Following issue #3, #4 fixed it by putting shims directly at the root of the homedir instead of /tmp.

I have a situation here where the homedir is mounted read-only in a constrained environment for build purposes (I do not want the homedir to be tampered if something in the build process fails).

I am wondering if setting the location of the shims through an environment variable (something like $SPAWN_WRAP_SHIMS) is something that you would be willing to consider?

@gautaz
Copy link
Author

gautaz commented May 12, 2017

@isaacs Sorry to bother you, I've hit this issue again, have you any thoughts on this particular matter?
Would a PR with something close to my previous proposal have any chance of being accepted?

@chadxz
Copy link
Contributor

chadxz commented Oct 16, 2017

i've run into a similar issue with a constrained environment. In my case, the process is running inside a docker container and the user does not actually exist inside the container, but does exist on the host. The call to 'os-homedir' results in /, which leads to:

Error: EACCES: permission denied, mkdir '/.node-spawn-wrap-67-1f7e3b94ac0e'

Would be great if these files could be written to a temp directory that is writable by all instead of relying on the user's home directory to exist. Or like the OP suggested, be able to somehow configure the location via an environment variable.

@isaacs isaacs closed this as completed in e5dd4a2 Oct 16, 2017
@gautaz
Copy link
Author

gautaz commented Oct 17, 2017

Thanks a lot!
Will ease things without workarounds (I was patching spawn-wrap on the fly).

I wasn't sure that proposing directly a PR for this was the right thing to do without any feedback, but if this is the way to go, I'll gladly do it next time.

@isaacs
Copy link
Collaborator

isaacs commented Oct 19, 2017

Sometimes it's easier to explain what you want in JavaScript than in english. But I'm happy to get suggestions in either language :) The fix was pretty straightforward knowing the codebase, but since this module in particular is a bit of a dense little thicket, I sometimes feel weird asking people to dive into 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