55
66import { Emitter , Event } from 'vs/base/common/event' ;
77import { 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' ;
99import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc' ;
1010import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
1111import { ILogService , ILoggerService , LogLevel } from 'vs/platform/log/common/log' ;
@@ -19,6 +19,7 @@ import { IGetTerminalLayoutInfoArgs, IProcessDetails, ISetTerminalLayoutInfoArgs
1919import { IPtyHostConnection , IPtyHostStarter } from 'vs/platform/terminal/node/ptyHost' ;
2020import { detectAvailableProfiles } from 'vs/platform/terminal/node/terminalProfiles' ;
2121import * as performance from 'vs/base/common/performance' ;
22+ import { getSystemShell } from 'vs/base/node/shell' ;
2223
2324enum 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