mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
Unable to resolve your shell pops-up instantly (fix #136272)
This commit is contained in:
@@ -282,7 +282,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) => {
|
||||
@@ -990,7 +990,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
|
||||
@@ -1022,11 +1022,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