src/Tools/VSCode/patches/cli.patch
author wenzelm
Mon, 14 Mar 2022 21:56:46 +0100
changeset 75279 9229f2681db7
parent 75277 f64725832d63
permissions -rw-r--r--
clarified directory layout and settings: more robust on all platforms;

diff --git a/src/vs/code/node/cli.ts b/src/vs/code/node/cli.ts
--- a/src/vs/code/node/cli.ts
+++ b/src/vs/code/node/cli.ts
@@ -363,9 +363,11 @@ export async function main(argv: string[]): Promise<any> {
 		}
 
 		let child: ChildProcess;
+		const app_arg = '--app=' + process.env['ISABELLE_VSCODIUM_APP'];
+		const electron_args = [app_arg].concat(argv.slice(2));
 		if (!isMacOSBigSurOrNewer) {
 			// We spawn process.execPath directly
-			child = spawn(process.execPath, argv.slice(2), options);
+			child = spawn(process.execPath, electron_args, options);
 		} else {
 			// On Big Sur, we spawn using the open command to obtain behavior
 			// similar to if the app was launched from the dock
@@ -425,7 +427,7 @@ export async function main(argv: string[]): Promise<any> {
 				}
 			}
 
-			spawnArgs.push('--args', ...argv.slice(2)); // pass on our arguments
+			spawnArgs.push('--args', ...electron_args); // pass on our arguments
 
 			if (env['VSCODE_DEV']) {
 				// If we're in development mode, replace the . arg with the