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

Fix --watch handling of deleted sources #3275

Merged
merged 4 commits into from
Dec 8, 2013
Merged

Conversation

marchaefner
Copy link
Collaborator

  • Fixes Source maps don't get deleted when using --watch #3267 (Source maps don't get deleted when using --watch)
  • Suppress EPERM errors from watchers (see also below)
  • Minor readability improvements
    • Remove unnecessary parameter of removeSource
    • Explicitly declare watcher at scope start
    • Consistent use of err for errors and exceptions

Suppressing EPERM

If a watched directory gets deleted its fs.FSWatcher throws EPERM (not to be confused with EACCESS). The same happens for the watchers of contained files and fs.unlink. We have to fix it on our end because it will not be fixed in node (see nodejs/node-v0.x-archive#4337).

This PR simply suppresses the error. I also refrained from adding if process.platform is 'win32' tests. All other causes of EPERM should break the actual compilation, i.e. when reading and writing files.

jashkenas added a commit that referenced this pull request Dec 8, 2013
Fix --watch handling of deleted sources
@jashkenas jashkenas merged commit 94e22ab into jashkenas:master Dec 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source maps don't get deleted when using --watch
2 participants