5
5
6
6
import { Emitter , Event } from 'vs/base/common/event' ;
7
7
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' ;
9
9
import { ProxyChannel } from 'vs/base/parts/ipc/common/ipc' ;
10
10
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
11
11
import { ILogService , ILoggerService , LogLevel } from 'vs/platform/log/common/log' ;
@@ -19,6 +19,7 @@ import { IGetTerminalLayoutInfoArgs, IProcessDetails, ISetTerminalLayoutInfoArgs
19
19
import { IPtyHostConnection , IPtyHostStarter } from 'vs/platform/terminal/node/ptyHost' ;
20
20
import { detectAvailableProfiles } from 'vs/platform/terminal/node/terminalProfiles' ;
21
21
import * as performance from 'vs/base/common/performance' ;
22
+ import { getSystemShell } from 'vs/base/node/shell' ;
22
23
23
24
enum Constants {
24
25
MaxRestarts = 5
@@ -122,7 +123,7 @@ export class PtyHostService extends Disposable implements IPtyService {
122
123
}
123
124
124
125
private async _refreshIgnoreProcessNames ( ) : Promise < void > {
125
- return this . _proxy . refreshIgnoreProcessNames ?.( this . _ignoreProcessNames ) ;
126
+ return this . _optionalProxy ? .refreshIgnoreProcessNames ?.( this . _ignoreProcessNames ) ;
126
127
}
127
128
128
129
private async _resolveShellEnv ( ) : Promise < typeof process . env > {
@@ -286,7 +287,7 @@ export class PtyHostService extends Disposable implements IPtyService {
286
287
}
287
288
288
289
getDefaultSystemShell ( osOverride ?: OperatingSystem ) : Promise < string > {
289
- return this . _proxy . getDefaultSystemShell ( osOverride ) ;
290
+ return this . _optionalProxy ? .getDefaultSystemShell ( osOverride ) ?? getSystemShell ( osOverride ?? OS , process . env ) ;
290
291
}
291
292
async getProfiles ( workspaceId : string , profiles : unknown , defaultProfile : unknown , includeDetectedProfiles : boolean = false ) : Promise < ITerminalProfile [ ] > {
292
293
const shellEnv = await this . _resolveShellEnv ( ) ;
0 commit comments