mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Merge remote-tracking branch 'origin/main' into alex/main-process-extension-host
This commit is contained in:
@@ -284,7 +284,7 @@ export class CodeApplication extends Disposable {
|
||||
}
|
||||
|
||||
// Resolve shell env
|
||||
return this.resolveShellEnvironment(args, env);
|
||||
return this.resolveShellEnvironment(args, env, false);
|
||||
});
|
||||
|
||||
ipcMain.handle('vscode:writeNlsFile', (event, path: unknown, data: unknown) => {
|
||||
@@ -999,7 +999,7 @@ export class CodeApplication extends Disposable {
|
||||
// Since this operation can take a long time, we want to warm it up while
|
||||
// the window is opening.
|
||||
// We also show an error to the user in case this fails.
|
||||
this.resolveShellEnvironment(this.environmentMainService.args, process.env);
|
||||
this.resolveShellEnvironment(this.environmentMainService.args, process.env, true);
|
||||
|
||||
// If enable-crash-reporter argv is undefined then this is a fresh start,
|
||||
// based on telemetry.enableCrashreporter settings, generate a UUID which
|
||||
@@ -1031,11 +1031,16 @@ export class CodeApplication extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private async resolveShellEnvironment(args: NativeParsedArgs, env: IProcessEnvironment): Promise<typeof process.env> {
|
||||
private async resolveShellEnvironment(args: NativeParsedArgs, env: IProcessEnvironment, notifyOnError: boolean): Promise<typeof process.env> {
|
||||
try {
|
||||
return await resolveShellEnv(this.logService, args, env);
|
||||
} catch (error) {
|
||||
this.windowsMainService?.sendToFocused('vscode:showResolveShellEnvError', toErrorMessage(error));
|
||||
const errorMessage = toErrorMessage(error);
|
||||
if (notifyOnError) {
|
||||
this.windowsMainService?.sendToFocused('vscode:showResolveShellEnvError', errorMessage);
|
||||
} else {
|
||||
this.logService.error(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user