-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fails to delete .grunt/grunt-contrib-jasmine in teardown #58
Comments
That's a weird one, what is still in that directory if you |
It's empty, every time the same. |
@reinseth does the problem still happen with latest rimraf (2.1.4)? |
Strangely, I cannot reproduce the error at all now (with the older rimraf). The only change I've made is rebooting the computer. So this might be some sort of a stability issue with windows/node, i don't know. Close the issue, and I'll post back if it happens again. |
Glad to hear it fixed itself! 👍 |
Closing. Thanks for updating the issue, @reinseth and @existentialism. |
Having the same issue running the current version of |
Can you test with rimraf 2.1.4 (as @existentialism suggested to me earlier)? If that doesn't resolve the problem, then my proposed fix should be considered again. |
Rebooted and upgraded to rimraf 2.1.4 but neither fixed the issue. Running osx 10.8.2, node 0.10.9, grunt-contrib-jasmine 0.4.2 |
@robdodson can you see if there are any permissions issues that would prevent grunt from deleting that dir when you run it? The directory ends up empty but remains? Or are there files in it? |
Interesting that this is happing on a nix filesystems as well. As for permissions, I seriously doubt it to be that (when I changed the operation to async, the problem disappeared). It is more likely a locking problem. This issue should be fixed as per my original suggestion. |
@jsoverson doesn't seem like a permission issue. It's in the same group and has all the same permissions as any other dir on my system. The directory doesn't have any files in it, it's just an empty |
This seems related to this issue: isaacs/rimraf#21 (look at this comment: isaacs/rimraf#19 (comment)) |
@robdodson yeah, the solution would be to use @reinseth's original suggestion. I'll try to get this in soon. This module needs a new push and I've been slacking on it. |
Updated rimraf, moved the deletion to the async method, and removed .grunt if it's empty. Hope this fixes any problems around this issue. |
I've just started to experience this problem:
All specs passes just fine, but the teardown function in the jasmine-task fails with the following error message:
Fatal error: ENOTEMPTY, directory not empty 'C:\[...]\.grunt\grunt-contrib-jasmine
As you can see by that path, this is on a Windows machine (win7 64-bit, running node 0.8 64-bit).
The error occurs in the cleanTemp() function in tasks/lib/jasmine.js:
The problem seems to be the sync delete operation (tested with grunt.file.delete, which also fails btw). Converting it to a standard async operation (which rimraf encourages to use) solves the problem.
So I'm proposing to convert the teardown function to be async.
Note: I can't reproduce this bug with a simple, trivial example application, and I can't supply the sources of the project I'm working on (required confidentiality).
The text was updated successfully, but these errors were encountered: