Stop packager logs error
Steps to reproduce:
- Open RN project.
- Start packager from command palette.
- Stop package from command palette.
After stopping the packger, an error is logged:
######### Error while executing: react-native start --port 8081 [object Object] ##########
I hit this as well
I just tried this out and saw something else strange: When starting, I saw it print out the Executing command: react-native start --port 8081 line twice, and then after I stopped it a while later the extension threw an exception stating that it couldn't start the packager. This error was the one from awaitStart failing all its retries.
The command executor for the packager doesn't actually ever finishes... The way we are killing it it's probably returning an error code, so CommandExecutor shows that error code. Is it possible to terminate the packager in a nicer way? So it'll exit with an 0 error code?
The problem is actually with the previous "unfinished" promise for "react-native start --port 8081". So, when the second command for killing the started process is triggered, the unfinished promise is flushed and is causing an error to be printed. I have a fix for it.