Skip to content

Commit 3d6d839

Browse files
committed
Don't spawn pty host on getDefaultSystemShell or refreshIgnoreProcessNames
1 parent f409c06 commit 3d6d839

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { Emitter, Event } from 'vs/base/common/event';
77
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
8-
import { IProcessEnvironment, OperatingSystem, isWindows } from 'vs/base/common/platform';
8+
import { IProcessEnvironment, OS, OperatingSystem, isWindows } from 'vs/base/common/platform';
99
import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
1010
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1111
import { ILogService, ILoggerService, LogLevel } from 'vs/platform/log/common/log';
@@ -19,6 +19,7 @@ import { IGetTerminalLayoutInfoArgs, IProcessDetails, ISetTerminalLayoutInfoArgs
1919
import { IPtyHostConnection, IPtyHostStarter } from 'vs/platform/terminal/node/ptyHost';
2020
import { detectAvailableProfiles } from 'vs/platform/terminal/node/terminalProfiles';
2121
import * as performance from 'vs/base/common/performance';
22+
import { getSystemShell } from 'vs/base/node/shell';
2223

2324
enum Constants {
2425
MaxRestarts = 5
@@ -122,7 +123,7 @@ export class PtyHostService extends Disposable implements IPtyService {
122123
}
123124

124125
private async _refreshIgnoreProcessNames(): Promise<void> {
125-
return this._proxy.refreshIgnoreProcessNames?.(this._ignoreProcessNames);
126+
return this._optionalProxy?.refreshIgnoreProcessNames?.(this._ignoreProcessNames);
126127
}
127128

128129
private async _resolveShellEnv(): Promise<typeof process.env> {
@@ -286,7 +287,7 @@ export class PtyHostService extends Disposable implements IPtyService {
286287
}
287288

288289
getDefaultSystemShell(osOverride?: OperatingSystem): Promise<string> {
289-
return this._proxy.getDefaultSystemShell(osOverride);
290+
return this._optionalProxy?.getDefaultSystemShell(osOverride) ?? getSystemShell(osOverride ?? OS, process.env);
290291
}
291292
async getProfiles(workspaceId: string, profiles: unknown, defaultProfile: unknown, includeDetectedProfiles: boolean = false): Promise<ITerminalProfile[]> {
292293
const shellEnv = await this._resolveShellEnv();

0 commit comments

Comments
 (0)