Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: remy/nodemon
base: 76420d3386
...
head fork: remy/nodemon
compare: c4a057e28f
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 20, 2012
@dylanmcd dylanmcd Fix for #82, while maintaining compatibility with #72. Uses fs.watch …
…as a fallback.
e43df19
Commits on Apr 23, 2012
@remy Merge pull request #85 from dylanmcd/patch-2
Fix for #82, while maintaining compatibility with #72. Uses fs.watch as a fallback.
c4a057e
Showing with 14 additions and 0 deletions.
  1. +14 −0 nodemon.js
View
14 nodemon.js
@@ -33,6 +33,20 @@ var fs = require('fs'),
reEscapeChars = /[.|\-[\]()\\]/g,
reAsterisk = /\*/g;
+// test to see if the version of find being run supports searching by seconds (-mtime -1s -print)
+if (noWatch) {
+ exec('find -L /dev/null -type f -mtime -1s -print', function(error, stdout, stderr) {
+ if (error) {
+ if (!fs.watch) {
+ util.error('\x1B[1;31mThe version of node you are using combined with the version of find being used does not support watching files. Upgrade to a newer version of node, or install a version of find that supports search by seconds.\x1B[0m');
+ process.exit(1);
+ } else {
+ noWatch = false;
+ }
+ }
+ });
+}
+
function startNode() {
util.log('\x1B[32m[nodemon] starting `' + program.options.exec + ' ' + program.args.join(' ') + '`\x1B[0m');

No commit comments for this range

Something went wrong with that request. Please try again.