diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Out-Host.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Out-Host.Tests.ps1 index eb4e1622b..fd54bf879 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Out-Host.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Out-Host.Tests.ps1 @@ -1,8 +1,8 @@ if ( ! (get-module -ea silentlycontinue TestHostCS )) { - $root = git rev-parse --show-toplevel - $pestertestroot = join-path $root test/powershell + # this is sensitive to the location of this test and the common directory" + $pestertestroot = resolve-path "$psscriptroot/../.." $common = join-path $pestertestroot Common $hostmodule = join-path $common TestHostCS.psm1 import-module $hostmodule