1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Exiting when users try to use --watch and fs.watch is undefined

This commit is contained in:
Trevor Burnham 2011-12-19 11:23:27 -05:00
parent 9de0d886eb
commit cfb9cb6fe9
2 changed files with 5 additions and 5 deletions

View file

@ -50,7 +50,7 @@
if (opts.require) loadRequires();
if (opts.interactive) return require('./repl');
if (opts.watch && !fs.watch) {
printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + ".");
return printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + ".");
}
if (opts.stdio) return compileStdio();
if (opts.eval) return compileScript(null, sources[0]);

View file

@ -65,7 +65,7 @@ exports.run = ->
loadRequires() if opts.require
return require './repl' if opts.interactive
if opts.watch and !fs.watch
printWarn "The --watch feature depends on Node v0.6.0+. You are running #{process.version}."
return printWarn "The --watch feature depends on Node v0.6.0+. You are running #{process.version}."
return compileStdio() if opts.stdio
return compileScript null, sources[0] if opts.eval
return require './repl' unless sources.length