From ace285a4a3fdd7f93136852cb4e1908c7052167a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 6 Dec 2017 07:47:53 +0100 Subject: [PATCH] fix #39722 --- src/vs/code/electron-main/main.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 8299843bf7d..ee22837dd13 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -127,13 +127,16 @@ function setupIPC(accessor: ServicesAccessor): TPromise { function setup(retry: boolean): TPromise { return serve(environmentService.mainIPCHandle).then(server => { - if (platform.isMacintosh) { - app.dock.show(); // dock might be hidden at this case due to a retry - } // Print --status usage info if (environmentService.args.status) { logService.warn('Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started.'); + throw new ExpectedError('Terminating...'); + } + + // dock might be hidden at this case due to a retry + if (platform.isMacintosh) { + app.dock.show(); } // Set the VSCODE_PID variable here when we are sure we are the first