I really understand the intention here: when executing the content for installation, we want to exit. But this is not the way to verify this, basically because this means that Runtime (which cares about a window and webcontents) now should care about whether or not the command line was "--install". If we change the way we install applications, we have to change this code, which is bad, because in theory is unrelated.

I would suggest looking into a way to teach Runtime to run in one-shot mode. Or teach Runtime how to tell someone else that the load is finished. The installation code would use those capabilities to achieve it's goal.