Fix pwsh shell integration tests

Part of #157083
This commit is contained in:
Daniel Imms 2022-08-05 16:33:19 -07:00
parent 4a0555d948
commit 8eeac1fb29
No known key found for this signature in database
GPG key ID: E5CF412B63651C69

View file

@ -25,14 +25,14 @@ suite('platform - terminalEnvironment', () => {
suite('pwsh', () => {
const expectedPs1 = process.platform === 'win32'
? `${repoRoot}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1`
: `${repoRoot}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1`;
? `try { . "${repoRoot}\\out\\vs\\workbench\\contrib\\terminal\\browser\\media\\shellIntegration.ps1" } catch {}`
: `. "${repoRoot}/out/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1"`;
suite('should override args', () => {
const enabledExpectedResult = Object.freeze<IShellIntegrationConfigInjection>({
newArgs: [
'-noexit',
'-command',
`. "${expectedPs1}"`
expectedPs1
],
envMixin: {
VSCODE_INJECTION: '1'
@ -63,7 +63,7 @@ suite('platform - terminalEnvironment', () => {
'-l',
'-noexit',
'-command',
`. "${expectedPs1}"`
expectedPs1
],
envMixin: {
VSCODE_INJECTION: '1'