Skip to content

Conversation

jedwards1211
Copy link

Calling run() directly in a script more than once doesn't work right because there are global variables in the supervisor module, so when I change files watched by the first run() call, it restarts the command to the second run() call.

Simply moving all of these variables (and functions) inside run() should fix this without causing problems for anything else

@petruisfan
Copy link
Owner

Hello! Thx for the pull request.
Unfortunately the code does not work. I get the error "TypeError: findAllWatchFiles is not a function". Please update your pr.

@jedwards1211
Copy link
Author

Okay, I fixed the tests, except that I can't figure out how to get the test process to terminate; something in supervisor.js is keeping the process alive. There was a call to process.kill() but I removed it because it was missing a pid argument. I added finally blocks to kill the child process and file watchers at the end of each test case.

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.

2 participants