|
1 diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts |
|
2 --- a/src/vs/code/node/cli.ts |
|
3 +++ b/src/vs/code/node/cli.ts |
|
4 @@ -24,6 +24,7 @@ import product from 'vs/platform/product/common/product'; |
|
5 import { CancellationTokenSource } from 'vs/base/common/cancellation'; |
|
6 import { randomPath } from 'vs/base/common/extpath'; |
|
7 import { Utils } from 'vs/platform/profiling/common/profiling'; |
|
8 +import * as path from 'path'; |
|
9 |
|
10 function shouldSpawnCliProcess(argv: NativeParsedArgs): boolean { |
|
11 return !!argv['install-source'] |
|
12 @@ -363,9 +364,11 @@ export async function main(argv: string[]): Promise<any> { |
|
13 } |
|
14 |
|
15 let child: ChildProcess; |
|
16 + const app_arg = '--app=' + path.join(path.dirname(process.execPath), 'resources', 'vscodium'); |
|
17 + const electron_args = [app_arg].concat(argv.slice(2)); |
|
18 if (!isMacOSBigSurOrNewer) { |
|
19 // We spawn process.execPath directly |
|
20 - child = spawn(process.execPath, argv.slice(2), options); |
|
21 + child = spawn(process.execPath, electron_args, options); |
|
22 } else { |
|
23 // On Big Sur, we spawn using the open command to obtain behavior |
|
24 // similar to if the app was launched from the dock |
|
25 @@ -425,7 +428,7 @@ export async function main(argv: string[]): Promise<any> { |
|
26 } |
|
27 } |
|
28 |
|
29 - spawnArgs.push('--args', ...argv.slice(2)); // pass on our arguments |
|
30 + spawnArgs.push('--args', ...electron_args); // pass on our arguments |
|
31 |
|
32 if (env['VSCODE_DEV']) { |
|
33 // If we're in development mode, replace the . arg with the |