neutralinojs / neutralinojs-cli

neu cli for Neutralinojs
https://neutralino.js.org/docs/cli/neu-cli
MIT License
91 stars 56 forks source link

Don't kill the process when a command isn't found #237

Closed KTibow closed 6 months ago

KTibow commented 6 months ago

So the way Node works is it ends the process successfully when nothing is currently running. Even if the main thread is awaiting a promise, if no work is being done, it ends the process. We have it currently set up so that we await frontend commands. However, if the command isn't found, we never resolve or reject it. We just return from the Promise, leaving it hanging. This makes Node exit, which heavily confused me. This makes it so that it doesn't return a Promise unless it finds the command. This lets it just continue on if the command isn't set up.

If this is merged, this will fix a bug that's blocking me from building my app.