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.
This commit is contained in:
Asher
2026-07-01 12:11:31 -08:00
parent 7d5cabdd54
commit 306b980578

View File

@@ -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<IServerAPI> | 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
});
});