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 running with unwritable homedir #79

Open
Krinkle opened this issue Jan 2, 2019 · 2 comments
Open

Support running with unwritable homedir #79

Krinkle opened this issue Jan 2, 2019 · 2 comments

Comments

@Krinkle
Copy link

Krinkle commented Jan 2, 2019

This follows-up from #3 and #49.

The CI environment I use for some projects runs builds in a Docker container as nobody and its default of HOME=/nonexistent. Due to this, projects using spawn-wrap (such as istanbuljs/nyc for code coverage), fail to operate in CI as it tries to unconditionally make a (temporary) directory in HOME.

Downstream:

Would you be open toward a patch that considers XDG_CACHE_HOME before falling back to HOME?

This way, we wouldn't have to maintain an hardcoded exception in our CI environment (or in package.json#scripts.test) that sets SPAWN_WRAP_SHIM_ROOT. I imagine this would be beneficial to other users as well.

Thanks.

@demurgos
Copy link
Contributor

demurgos commented May 7, 2019

An alternative would be to use /tmp. spawn-wrap doesn't really have to use the home directory, any directory with write access should work. XDG_CACHE_HOME is also a fitting location to use.

@Krinkle
Copy link
Author

Krinkle commented May 7, 2019

@demurgos This library originally used /tmp, but this was changed due to #3.

It needs both write access and allow executable files.

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

2 participants