Skip to content

Commit 2062a59

Browse files
authored
Merge pull request microsoft#157351 from microsoft/tyriar/1_70_fix_ps1_tests
[1.70] Fix pwsh shell integration tests
2 parents cad5890 + f4047fb commit 2062a59

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/platform/terminal/test/node/terminalEnvironment.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ suite('platform - terminalEnvironment', () => {
2525

2626
suite('pwsh', () => {
2727
const expectedPs1 = process.platform === 'win32'
28-
? `${repoRoot}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1`
29-
: `${repoRoot}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1`;
28+
? `try { . "${repoRoot}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}`
29+
: `. "${repoRoot}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"`;
3030
suite('should override args', () => {
3131
const enabledExpectedResult = Object.freeze<IShellIntegrationConfigInjection>({
3232
newArgs: [
3333
'-noexit',
3434
'-command',
35-
`. "${expectedPs1}"`
35+
expectedPs1
3636
],
3737
envMixin: {
3838
VSCODE_INJECTION: '1'
@@ -63,7 +63,7 @@ suite('platform - terminalEnvironment', () => {
6363
'-l',
6464
'-noexit',
6565
'-command',
66-
`. "${expectedPs1}"`
66+
expectedPs1
6767
],
6868
envMixin: {
6969
VSCODE_INJECTION: '1'

0 commit comments

Comments
 (0)