@@ -43,7 +43,7 @@ import { ExtensionScanner, ExtensionScannerInput } from 'vs/workbench/services/e
43
43
class Watcher extends DiskFileSystemProvider {
44
44
public readonly watches = new Map < number , IDisposable > ( ) ;
45
45
46
- public dispose ( ) : void {
46
+ public override dispose ( ) : void {
47
47
this . watches . forEach ( ( w ) => w . dispose ( ) ) ;
48
48
this . watches . clear ( ) ;
49
49
super . dispose ( ) ;
@@ -263,6 +263,7 @@ export class ExtensionEnvironmentChannel implements IServerChannel {
263
263
globalStorageHome : this . environment . globalStorageHome ,
264
264
workspaceStorageHome : this . environment . workspaceStorageHome ,
265
265
userHome : this . environment . userHome ,
266
+ useHostProxy : false ,
266
267
os : platform . OS ,
267
268
marks : [ ]
268
269
} ;
@@ -382,7 +383,7 @@ class VariableResolverService extends AbstractVariableResolverService {
382
383
getLineNumber : ( ) : string | undefined => {
383
384
return args . resolvedVariables . selectedText ;
384
385
} ,
385
- } , undefined , env ) ;
386
+ } , undefined , Promise . resolve ( env ) ) ;
386
387
}
387
388
}
388
389
@@ -442,6 +443,7 @@ class Terminal extends TerminalProcess {
442
443
workspaceId : this . workspaceId ,
443
444
workspaceName : this . workspaceName ,
444
445
isOrphan : this . isOrphan ,
446
+ icon : 'bash' // TODO@oxy : currently unused by vscode
445
447
} ;
446
448
}
447
449
}
@@ -472,8 +474,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
472
474
473
475
// Buffer to reduce the number of messages going to the renderer.
474
476
private readonly bufferer = new TerminalDataBufferer ( ( id , data ) => {
475
- // TODO: Not sure what sync means.
476
- this . _onProcessData . fire ( { id, event : { data, sync : true } } ) ;
477
+ this . _onProcessData . fire ( { id, event : data } ) ;
477
478
} ) ;
478
479
479
480
public constructor ( private readonly logService : ILogService ) { }
@@ -564,27 +565,26 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
564
565
toResource : ( relativePath : string ) => resources . joinPath ( activeWorkspaceUri , relativePath ) ,
565
566
} : undefined ;
566
567
567
- const resolverService = new VariableResolverService ( remoteAuthority , args , process . env as platform . IProcessEnvironment ) ;
568
- const resolver = terminalEnvironment . createVariableResolver ( activeWorkspace , resolverService ) ;
568
+ const resolverService = new VariableResolverService ( remoteAuthority , args , process . env ) ;
569
+ const resolver = terminalEnvironment . createVariableResolver ( activeWorkspace , process . env , resolverService ) ;
569
570
570
571
const getDefaultShellAndArgs = async ( ) : Promise < { executable : string ; args : string [ ] | string } > => {
571
572
if ( shellLaunchConfig . executable ) {
572
- const executable = resolverService . resolve ( activeWorkspace , shellLaunchConfig . executable ) ;
573
+ const executable = await resolverService . resolveAsync ( activeWorkspace , shellLaunchConfig . executable ) ;
573
574
let resolvedArgs : string [ ] | string = [ ] ;
574
575
if ( shellLaunchConfig . args && Array . isArray ( shellLaunchConfig . args ) ) {
575
576
for ( const arg of shellLaunchConfig . args ) {
576
- resolvedArgs . push ( resolverService . resolve ( activeWorkspace , arg ) ) ;
577
+ resolvedArgs . push ( await resolverService . resolveAsync ( activeWorkspace , arg ) ) ;
577
578
}
578
579
} else if ( shellLaunchConfig . args ) {
579
- resolvedArgs = resolverService . resolve ( activeWorkspace , shellLaunchConfig . args ) ;
580
+ resolvedArgs = await resolverService . resolveAsync ( activeWorkspace , shellLaunchConfig . args ) ;
580
581
}
581
582
return { executable, args : resolvedArgs } ;
582
583
}
583
584
584
585
const executable = terminalEnvironment . getDefaultShell (
585
586
( key ) => args . configuration [ key ] ,
586
- args . isWorkspaceShellAllowed ,
587
- await getSystemShell ( platform . platform , process . env as platform . IProcessEnvironment ) ,
587
+ await getSystemShell ( platform . OS , process . env as platform . IProcessEnvironment ) ,
588
588
process . env . hasOwnProperty ( 'PROCESSOR_ARCHITEW6432' ) ,
589
589
process . env . windir ,
590
590
resolver ,
@@ -594,7 +594,6 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
594
594
595
595
const resolvedArgs = terminalEnvironment . getDefaultShellArgs (
596
596
( key ) => args . configuration [ key ] ,
597
- args . isWorkspaceShellAllowed ,
598
597
false , // useAutomationShell
599
598
resolver ,
600
599
this . logService ,
@@ -625,7 +624,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
625
624
logger . debug ( 'Resolved shell launch configuration' , field ( 'id' , terminalId ) ) ;
626
625
627
626
// Use instead of `terminal.integrated.env.${platform}` to make types work.
628
- const getEnvFromConfig = ( ) : terminal . ISingleTerminalConfiguration < ITerminalEnvironment > => {
627
+ const getEnvFromConfig = ( ) : ITerminalEnvironment => {
629
628
if ( platform . isWindows ) {
630
629
return args . configuration [ 'terminal.integrated.env.windows' ] ;
631
630
} else if ( platform . isMacintosh ) {
@@ -635,7 +634,7 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
635
634
} ;
636
635
637
636
const getNonInheritedEnv = async ( ) : Promise < platform . IProcessEnvironment > => {
638
- const env = await getMainProcessParentEnv ( ) ;
637
+ const env = await getMainProcessParentEnv ( process . env ) ;
639
638
env . VSCODE_IPC_HOOK_CLI = process . env [ 'VSCODE_IPC_HOOK_CLI' ] ! ;
640
639
return env ;
641
640
} ;
@@ -644,7 +643,6 @@ export class TerminalProviderChannel implements IServerChannel<RemoteAgentConnec
644
643
shellLaunchConfig ,
645
644
getEnvFromConfig ( ) ,
646
645
resolver ,
647
- args . isWorkspaceShellAllowed ,
648
646
product . version ,
649
647
args . configuration [ 'terminal.integrated.detectLocale' ] ,
650
648
args . configuration [ 'terminal.integrated.inheritEnv' ] !== false
0 commit comments