istanbuljs / istanbuljs/spawn-wrap

Support running with unwritable homedir

Open
#79 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
41
Forks
18
PR merge metrics
No merged PRs in 30d

Description

This follows-up from https://github.com/tapjs/spawn-wrap/issues/3 and https://github.com/tapjs/spawn-wrap/issues/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](https://github.com/istanbuljs/nyc/issues/951) for code coverage), fail to operate in CI as it tries to unconditionally make a (temporary) directory in HOME.

Downstream:
* https://github.com/istanbuljs/nyc/issues/951
* https://phabricator.wikimedia.org/T212602#4847719

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.