From 306b98057886c4c5f4bcde198fed6b5238a0af01 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 1 Jul 2026 12:11:31 -0800 Subject: [PATCH] Update parsedArgs integration There is a new use of parsedArgs so we have to pass that in since we parse on demand instead of globally. --- patches/integration.diff | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/patches/integration.diff b/patches/integration.diff index acb355827..2d4507fe2 100644 --- a/patches/integration.diff +++ b/patches/integration.diff @@ -273,6 +273,15 @@ Index: code-server/lib/vscode/src/server-main.ts // Do a quick parse to determine if a server or the cli needs to be started const parsedArgs = minimist(process.argv.slice(2), { boolean: ['start-server', 'list-extensions', 'print-ip-address', 'help', 'version', 'accept-server-license-terms', 'update-extensions'], +@@ -50,7 +53,7 @@ if (shouldSpawnCli) { + mod.spawnCli(); + }); + } else { +- installServerProcessExitDiagnostics(); ++ installServerProcessExitDiagnostics(parsedArgs); + + let _remoteExtensionHostAgentServer: IServerAPI | null = null; + let _remoteExtensionHostAgentServerPromise: Promise | null = null; @@ -153,6 +156,7 @@ if (shouldSpawnCli) { } }); @@ -281,6 +290,15 @@ Index: code-server/lib/vscode/src/server-main.ts function sanitizeStringArg(val: unknown): string | undefined { if (Array.isArray(val)) { // if an argument is passed multiple times, minimist creates an array +@@ -173,7 +177,7 @@ function sanitizeStringArg(val: unknown) + * provided) so they survive process teardown (an async stdio write from an + * `exit` handler does not). + */ +-function installServerProcessExitDiagnostics(): void { ++function installServerProcessExitDiagnostics(parsedArgs: minimist.ParsedArgs): void { + if (!process.env['VSCODE_SERVER_EXIT_DIAGNOSTICS']) { + return; + } @@ -406,3 +410,22 @@ function prompt(question: string): Promi }); });