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

cache directory is created even with disabled cache #563

Closed
lo1tuma opened this issue May 2, 2017 · 5 comments · Fixed by #567
Closed

cache directory is created even with disabled cache #563

lo1tuma opened this issue May 2, 2017 · 5 comments · Fixed by #567
Labels

Comments

@lo1tuma
Copy link

lo1tuma commented May 2, 2017

Please use the template provided below, when reporting bugs:

Expected Behavior

The cache directory is not created when caching is disabled via CLI flag.

Observed Behavior

NYC tries to create a .cache folder inside of node_modules which is a read-only folder in my case, so nyc crashes:

Error: EACCES: permission denied, mkdir '/var/jenkins_home/workspace/vice_greenkeeper-nyc-10.3.0-KYGEY35BZNVKHFVMGU26NETJXLH2N255323GM27RZYFF2EISVZGQ/node_modules/.cache'

Bonus Points! Code (or Repository) that Reproduces Issue

We run nyc as a npm run-script: nyc --cache false --all npm run test:unit.

Forensic Information

We use nix in our CI system to ensure having a reproducible build, hence all build artifacts (e.g. node_modules folder) are immutable (i.e. read-only).

Operating System: the operating system you observed the issue on.

Ubuntu

Environment Information: information about your project's environment, see instructions below:

Linux 4.2.0-23-generic
node v7.7.3
npm v4.1.2

@lo1tuma
Copy link
Author

lo1tuma commented May 2, 2017

This issue was introduced with nyc version v10.3.0.
It works fine with version v10.2.0 or lower.

@bcoe
Copy link
Member

bcoe commented May 5, 2017

@lo1tuma could you give this a shot:

npm i nyc@next

I think I figured out what was happening to you.

@lo1tuma
Copy link
Author

lo1tuma commented May 5, 2017

@bcoe I’ve just tested it with version [email protected] and it works fine.
Thank you for quickly providing a fix 🍻.

@fstoerkle
Copy link

As 10.3.2 is already released, I think this can be closed now

@bcoe
Copy link
Member

bcoe commented May 11, 2017

@fstoerkle @lo1tuma awesome 👍

@bcoe bcoe closed this as completed May 11, 2017
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.

4 participants