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

grunt.file.recurse dies when working in a directory with an Emacs interlock file #1165

Open
ian-plunkett-ck opened this issue Jun 18, 2014 · 6 comments
Labels
Milestone

Comments

@ian-plunkett-ck
Copy link

Emacs uses interlock files to prevent simultaneous editing - https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html

While recursing over directory containing an interlock file, grunt.file.recurse dies with:
Warning: ENOENT, no such file or directory '' Use --force to continue.

@vladikoff
Copy link
Member

Please post your code. Thanks!

@vladikoff vladikoff added this to the 0.4.6 milestone Jun 18, 2014
@ian-plunkett-ck
Copy link
Author

Hi Vlad. I put a quick demo of the failure up here - https://github.com/iancreditkarma/grunt-file-recurse-fail

Just run setup.sh to cause the failure. Looks like grunt.file.recurse is choking on a broken symlink. That probably shouldn't cause a fatal error, right?

@vladikoff vladikoff reopened this Jun 19, 2014
@ian-plunkett-ck
Copy link
Author

Hi Vlad, I actually have a bit of working code that fixes this issue. I wrap fs.statSync(filepath).isDirectory() in a try/catch block and then write the error to grunt.log.error()

Can I put a pull request up for this?

@vladikoff
Copy link
Member

@iancreditkarma sure, we shall take a look at it

@ian-plunkett-ck
Copy link
Author

I'll submit the patch shortly

@ian-plunkett-ck
Copy link
Author

Hi Vlad, I created a pull request here - #1170. Let me know if it is up to snuff.

@vladikoff vladikoff added the fs label Jun 20, 2014
@vladikoff vladikoff modified the milestones: 0.4.7, 0.4.6 Jul 10, 2014
@cowboy cowboy modified the milestones: 0.4.6, 0.4.7 Jul 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants