-
Notifications
You must be signed in to change notification settings - Fork 3k
Make sure that the etc directory exists before attempting to write to it.
#7249
Conversation
|
I can't figure out how to write a test for this. @othiym23, I'd love some guidance :-) |
|
Create a directory tree that you can set as the |
|
Interesting, ok thanks, I'll give it a shot. |
|
Did you make any headway with the tests for this? I've now fixed the test suite for Node 0.11.16 / io.js 1.1.0 (as far as I know). |
|
No, I haven't made any headway yet. However, I still get failures on latest master in io.js - also many of the tests still take forever. See https://gist.github.com/ljharb/a3366c4a21398d52f6b0 for the 22 failures I get. |
|
Have you tried running |
|
@othiym23 After |
fbeacbc to
a2e7f7b
Compare
|
I updated the PR with this test attempt - but I'm still getting EACCES errors even with the fix applied. Some more guidance, if you have it, would be lovely :-) |
|
@ljharb I cleaned up the test a bunch in https://gist.github.com/othiym23/faa31f03736c3a747c5a. There's a lot going on in that diff, so I included the full test as a standalone file. Here's a summary of the changes:
I think that's probably good enough to land, so if you want, I can land that, or you can update the PR with whatever tweaks you want to make. Thanks for your patience! |
a2e7f7b to
d9ddfcb
Compare
|
Thanks, this is perfect! I added your commit to the PR and updated it. |
|
Finally landed as 6fd0fbd, rebased and squashed, with a few small tweaks to the test to make it more robust. Thanks for the fix and your patience, Jordan! |
|
Yay, thanks! :-D |
|
Oops, that's clearly something I failed to consider. I'll take a crack at it today but please don't let that slow anyone else from fixing it sooner. |
|
The change should probably be to move the creation of the containing |
|
@ljharb any progress on this? |
|
None yet. I'll try to make time this week. |
|
@ljharb Cool; I might look into it if I get a moment later this week; i'll let you know if I do. |
|
Also seeing this issue when using the prefix argument. etc folders are flooding my directories anywhere an npm package gets installed. These folders are empty and harmless but they are kind of an eyesore to see everywhere an npm install is executed with a prefix set. |
|
I also see the issue when use --prefix on npm install... any news about that? |
|
Same here. Empty |
|
Same here any fix on this? Appears when I run |
|
+1 @finetimi this is exactly what is happening with me right now. |
|
As justechn says.. yields: |
Fixes #7233.