Bring back expose shell's environment - bash (#237844)

* bring back expose shell's environment bash

* I want to see why the test is failing the build

* Pass test, disable it until we enable for stable

---------

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
This commit is contained in:
Anthony Kim
2025-01-14 13:15:46 -05:00
committed by GitHub
parent 2174db3d18
commit 35b2db3ed1
5 changed files with 113 additions and 1 deletions

View File

@@ -87,6 +87,23 @@ import { assertNoRpc } from '../utils';
await closeTerminalAsync(terminal);
});
if (platform() === 'darwin' || platform() === 'linux') {
// TODO: Enable when this is enabled in stable, otherwise it will break the stable product builds only
test.skip('Test if env is set', async () => {
const { shellIntegration } = await createTerminalAndWaitForShellIntegration();
await new Promise<void>(r => {
disposables.push(window.onDidChangeTerminalShellIntegration(e => {
if (e.shellIntegration.env) {
r();
}
}));
});
ok(shellIntegration.env);
ok(shellIntegration.env.PATH);
ok(shellIntegration.env.PATH.length > 0, 'env.PATH should have a length greater than 0');
});
}
test('execution events should fire in order when a command runs', async () => {
const { terminal, shellIntegration } = await createTerminalAndWaitForShellIntegration();
const events: string[] = [];