[keyserver] Avoid concurrently calling source-nvm.sh in yarn dev
Summary:
yarn dev currently calls source-nvm.sh twice at the same time. If the version of Node is not installed already, both calls will trigger an install.
The result is that one of the calls "clobbers" the other one's download, and the other call decides that the download failed and it needs to compile Node from source (which takes a long time).
This diff makes sure we call source-nvm.sh at the start (not concurrently), and wait for it to finish before we call the other commands.
Test Plan:
- nvm uninstall 16.18 and run yarn dev again
- Replaced the nodemon call with a node --version call, which confirmed I needed to keep the source-nvm.sh in front of that part of the command
Reviewers: atul, inka
Reviewed By: atul
Subscribers: tomek, abosh
Differential Revision: https://phab.comm.dev/D5484