better handling of CLI args - fixes #1436

This commit is contained in:
Eugene Pankov
2021-01-24 19:06:41 +01:00
parent 0cf883cc4a
commit f103e71285
4 changed files with 17 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ if (argv.d) {
})
}
app.on('ready', () => {
app.on('ready', async () => {
if (process.platform === 'darwin') {
app.dock.setMenu(Menu.buildFromTemplate([
{
@@ -65,5 +65,8 @@ app.on('ready', () => {
]))
}
application.init()
application.newWindow({ hidden: argv.hidden })
const window = await application.newWindow({ hidden: argv.hidden })
await window.ready
window.passCliArguments(process.argv, process.cwd(), false)
})