Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Watch command should not spawn more than one tsc watch (#5391)
The watch command was spawning multiple tsc watch processes, which conflicted with each other. This could happen if a generate was kicked off while another one was running, which is now prevented via a lockfile; if a generate tries to run while the lock is set, it just sleeps for a few seconds and retries later. The other issue is that the tsc watch was not getting killed by the `stop_tsc_watch` function. It seems that yarn starts whatever command it receives as a detached process, so killing the parent still left a zombie tsc watch running. By calling tsc directly we now start the process ourselves and get the proper pid to kill it later. Please read [contributing guidelines](CONTRIBUTING.md) and remove this line.
- Loading branch information