mongodb-js / electron-squirrel-startup

Default Squirrel.Windows event handler for your Electron apps.
Apache License 2.0
217 stars 41 forks source link

Code quits once it finishing handling squirrel flag #36

Open trodi opened 5 years ago

trodi commented 5 years ago

The usage documentation shows calling app.quit() after requireing electron-squirrel-startup, however, the code calls quit itself. This is misleading. If you run your own code on one of these flags after requireing electron-squirrel-startup, the app will quit from under you. The documentation should match the code. It would be nice to only optionally quit or not quit at all for flexibility.

Usage Docs

if(require('electron-squirrel-startup')) app.quit();

Source Code

https://github.com/mongodb-js/electron-squirrel-startup/blob/29221a02c38bc43655e5c67e189e2a25105753f6/index.js#L21