Disable file watching on Windows #17

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants

jbuck commented Apr 25, 2012

I played with the fs.watch API, but it is pretty awful right now. If the file doesn't exist, then you need to watch the directory for renames, then watch the file if it exists. This small change at least allows for devs to use node-config on Windows rather than erroring out.

Owner

lorenwest commented Apr 25, 2012

Thanks for the pull request, Jon. I ran into this issue a couple months ago, and think it's a matter of using the new file watching API when we're running in node > 0.6. I'd rather put that into place vs. disabling file watching on windows. For node-config, we're not watching for new files - just changes on existing files.

Give me a day or two, and if I can't get it running well on windows I'll merge in your pull request.

Owner

lorenwest commented Apr 25, 2012

0.4.12 was just published to npm with updated file watching. If the new style fs.watch is available (0.6.0 and above), otherwise it fails back to the older style fs.watchFile functionality.

lorenwest closed this Apr 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment