Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move all globals inside run() #194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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