cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.8k stars 128 forks source link

Modd continously sends a signal to the daemon command. #9

Closed sheki closed 8 years ago

sheki commented 8 years ago

I have a moddfile

**/*.js {
    daemon: BRIGHT_ENV=local node ./tools/devServer.js -p 9999 --src src --dest build
}

This results in modd continuously sending the specified signal to the process. This happens without any file save events

$ GODEBUG=cgocheck=0 modd 15:10:36: daemon: BRIGHT_ENV=local node ./tools/devServer.js -p 9999 --src src --dest build

starting...

rm -rf /Users/sheki/github/brightsolar/api/build Compiling to /Users/sheki/github/brightsolar/api/build

sending signal hangup exited: signal: hangup starting... sending signal hangup exited: signal: hangup starting... sending signal hangup exited: signal: hangup starting... sending signal hangup exited: signal: hangup starting... sending signal hangup exited: signal: hangup```

cortesi commented 8 years ago

Hey there. This looks to me like the devServer daemon might be modifying a Javascript file, triggering a restart, which then modifies a JS file, which triggers a restart... etc. Is that possible?

If you run modd with the --debug flag, it will show the file modifications it's detected, which might clear things up.

cortesi commented 8 years ago

In fact, I'm going to guess that you need to exclude the build directory from modd's watch. You can exclude it like so:

**/*.js !build/** {
}

Or just run on the src directory:

src/**/*.js  {
}
cortesi commented 8 years ago

Closing, because I'm pretty sure this was just due to modifications in that build directory. If that's not the case, please do feel free to reopen.