npm cache clear
can delete a empty $HOME
#14012
Comments
Thanks for filing this! We have logic in |
@silverwind what is the version of npm that you were testing this with? i did
npm version was 3.10.8 when i just tried |
I think it was 3.10.7. You're not seeing it because when you enter the container, you will inevitably create dotfiles in $HOME and vacuum will only delete $HOME if it's totally empty. Try with my Dockerfile or cd to |
@silverwind ah, yea, got it now. that makes sense when i was running it "manually" |
Can you provide your |
|
Yes, removes the directory of the root user.
as root:
as normal user:
|
And I noticed that when the base is the same as the path (branch / directory) small piece of code based on https://github.com/npm/fs-vacuum#usage :
|
Due to this, it may be said that his issue should be moved to npm/fs-vacuum. On Wed, Nov 23, 2016 at 11:25 AM, helio-frota notifications@github.com
|
true, also I fixed 👍
I'm going to send a PR to vacuum. |
That sounds like a great help. Could you close this now?
…On Wed, Nov 23, 2016 at 2:47 PM, helio-frota ***@***.***> wrote:
true, also I fixed 👍
...
npm sill vacuum-fs quitting because lost the race to remove /root/.npm
npm sill vacuum-fs quitting because lost the race to remove /root/.npm
npm sill vacuum-fs quitting because can't remove home directory /root
npm verb exit [ 0, true ]
npm info ok
***@***.***:/# cd root/
***@***.***:~#
I'm going to send a PR to vacuum.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14012 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKr56DyY7ENQaYCw8AzMtCvhQx5Os8K8ks5rBMKHgaJpZM4KA7TA>
.
|
Fixes: #14012 PR-URL: npm/fs-vacuum#6 Credit: @helio-frota Reviewed-By: @zkat
What's going wrong?
When
$HOME
is empty,npm cache clear
will delete it after purging all caches. It should probably not navigate outside the cache directory.How can the CLI team reproduce the problem?
Use this
Dockerfile
and rundocker build --no-cache=true -t cacheclear .
:output including `vacuum-fs removing /root`
The text was updated successfully, but these errors were encountered: