Skip to content

Commit 43b3f5d

Browse files
committed
test get shellIntegration env
1 parent ef6ca9f commit 43b3f5d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/client/common/terminal/service.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,14 @@ export class TerminalService implements ITerminalService, Disposable {
9292
if (!terminal.shellIntegration && this._terminalFirstLaunched) {
9393
this._terminalFirstLaunched = false;
9494
const promise = new Promise<boolean>((resolve) => {
95-
const disposable = this.terminalManager.onDidChangeTerminalShellIntegration(() => {
95+
const disposable = this.terminalManager.onDidChangeTerminalShellIntegration((e) => {
9696
clearTimeout(timer);
9797
disposable.dispose();
9898
resolve(true);
99+
const shellIntegration = (terminal.shellIntegration as unknown) as { env: any };
100+
const tempEnv = shellIntegration.env;
101+
console.log(tempEnv);
102+
traceVerbose('Printing temp env from service.ts in terminal1');
99103
});
100104
const TIMEOUT_DURATION = 500;
101105
const timer = setTimeout(() => {
@@ -114,6 +118,11 @@ export class TerminalService implements ITerminalService, Disposable {
114118
return undefined;
115119
} else if (terminal.shellIntegration) {
116120
const execution = terminal.shellIntegration.executeCommand(commandLine);
121+
122+
const shellIntegration = (terminal.shellIntegration as unknown) as { env: any };
123+
const tempEnv = shellIntegration.env;
124+
console.log(tempEnv);
125+
traceVerbose('Printing temp env from service.ts in terminal2');
117126
traceVerbose(`Shell Integration is enabled, executeCommand: ${commandLine}`);
118127
return execution;
119128
} else {

0 commit comments

Comments
 (0)