Skip to content

Commit 8f2fb37

Browse files
authored
Eager getResolvedShellEnv call (fix microsoft#183069) (microsoft#183110)
1 parent 747b57b commit 8f2fb37

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/vs/platform/terminal/node/ptyHostService.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export class PtyHostService extends Disposable implements IPtyService {
5555
}
5656
}
5757

58-
private readonly _shellEnv: Promise<typeof process.env>;
5958
private readonly _resolveVariablesRequestStore: RequestStore<string[], { workspaceId: string; originalText: string[] }>;
6059
private _wasQuitRequested = false;
6160
private _restartCount = 0;
@@ -102,8 +101,6 @@ export class PtyHostService extends Disposable implements IPtyService {
102101
// remote server).
103102
registerTerminalPlatformConfiguration();
104103

105-
this._shellEnv = this._resolveShellEnv();
106-
107104
this._register(toDisposable(() => this._disposePtyHost()));
108105

109106

@@ -287,7 +284,7 @@ export class PtyHostService extends Disposable implements IPtyService {
287284
return this._proxy.getDefaultSystemShell(osOverride);
288285
}
289286
async getProfiles(workspaceId: string, profiles: unknown, defaultProfile: unknown, includeDetectedProfiles: boolean = false): Promise<ITerminalProfile[]> {
290-
const shellEnv = await this._shellEnv;
287+
const shellEnv = await this._resolveShellEnv();
291288
return detectAvailableProfiles(profiles, defaultProfile, includeDetectedProfiles, this._configurationService, shellEnv, undefined, this._logService, this._resolveVariables.bind(this, workspaceId));
292289
}
293290
getEnvironment(): Promise<IProcessEnvironment> {

0 commit comments

Comments
 (0)