Skip to content

Commit 3698e54

Browse files
committed
Fix TestE2EPowerShell for ADO
We weren't clearing the module path.
1 parent 1f74980 commit 3698e54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PowerShellEditorServices.build.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ Task TestE2EPowerShell -If (-not $script:IsNix) Build, SetupHelpForTests, {
241241
# TODO: See https://github.com/PowerShell/vscode-powershell/issues/3886
242242
# Inheriting the module path for powershell.exe breaks things!
243243
$originalModulePath = $env:PSModulePath
244+
$env:PSModulePath = ""
244245
Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 }
245246
} finally {
246247
$env:PSModulePath = $originalModulePath
@@ -280,6 +281,7 @@ Task TestE2EPowerShellCLM -If (-not $script:IsNix) Build, SetupHelpForTests, {
280281
# TODO: See https://github.com/PowerShell/vscode-powershell/issues/3886
281282
# Inheriting the module path for powershell.exe breaks things!
282283
$originalModulePath = $env:PSModulePath
284+
$env:PSModulePath = ""
283285
Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 }
284286
} finally {
285287
[System.Environment]::SetEnvironmentVariable("__PSLockdownPolicy", $null, [System.EnvironmentVariableTarget]::Machine)

0 commit comments

Comments
 (0)