-
Notifications
You must be signed in to change notification settings - Fork 100
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
Occasionally crashes with Atom's temporary files. #238
Comments
I think this is a problem in Chokidar and/or gulp-watch; it is missing some error handling at some point(s). You see, once the watcher fires an event, we add a delay before reading the file contents. It is possible that the file no longer exists by then. It should be possible to reproduce the issue even without a delay, as external file system changes (e.g. deleting files) may happen at any time during script execution. Not sure what's the best approach, maybe we can catch the error and don't fire the callback for added/changed files when they have been removed before we could read them. |
By the way, I believe you can temporarily workaround the issue by ignoring the backup files, e.g.: watch(['files/**/*', '!files/**/*~']) |
Actually, I believe you should always ignore the backup files—you most likely don't want them to be processed by gulp. So, my comment above is the correct fix for your specific case, but we can keep this issue open to improve our error handling. |
#242 has been merged into this issue. |
Seems to occasionally crash on a temporary files created by the "Backup before saving" option in Atom. Getting the following error:
Disabling the option fixes the error for me but it's not ideal. Issue also opened on the Atom repo.
The text was updated successfully, but these errors were encountered: