-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
Error when deleting .git folder in windows #19
Comments
👍 |
If you want to chmod a dir recursively, use https://github.com/isaacs/chmodr Note that |
Sorry Isaacs, I don't understand why you spotted your chmod tools. Do you believe that changing the owner will allow rimraf to delete the git folder ? |
chmod is for changing the mode, not the owner. (For that, you'd need chownr.) If you remove the read-only bit, then yes, it will delete just fine. |
Brunch users on windows recently (likely after update to node 0.10) started receiving errors like this:
So it fails to delete |
Ah, indeed, there seems to be a bug here. Posted on #21. |
+1 This affects me, but in Linux. Trying to remove test_sandbox folder: Error: ENOTEMPTY, rmdir 'tests/test_sandbox/.git' Looking for permission issues with this command:
So none of the files have read only permissions nor are owned by someone else. |
This issue only happens in windows when using
rimraf 2.1.x
. When using2.0.x
it works fine.When
rimraf
is used to delete a git repository, it fails when removing.git/objects/pack/*.idx and *.pack
files.I've spotted this issue because I've upgraded rimraf in
0.8.x
release of http://github.com/twitter/bower and windows users started to complain. After some debugging, theunlink
of these files error out withEPERM
. Thenrimraf
interprets them as a directory and some other error happens. I think this is related to the fact the older versions ofrimraf
tried to make the file writable before deleting it.When I tested, I had no hanging process on those files or the
.git
folder.To reproduce:
$ git clone git://github.com/satazor/SparkMD5.git
The text was updated successfully, but these errors were encountered: