From 763bb2c7aa341ea70febd93f3feb31a54fa4217c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 15 Apr 2022 20:04:30 +0200 Subject: [PATCH] macOS: open a new window if none are open when called from CLI - fixes #6031 --- app/lib/app.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/lib/app.ts b/app/lib/app.ts index c8ba4cab..47a30cc9 100644 --- a/app/lib/app.ts +++ b/app/lib/app.ts @@ -219,6 +219,9 @@ export class Application { } handleSecondInstance (argv: string[], cwd: string): void { + if (!this.windows.length) { + await this.newWindow() + } this.presentAllWindows() this.windows[this.windows.length - 1].passCliArguments(argv, cwd, true) }