Fix win-vs-env.psm1 and pester-extensions.psm1 (#15)

This commit is contained in:
Nikita Bykov
2020-09-08 11:39:22 +03:00
committed by GitHub
parent f8f76caff1
commit 89ebce9383
2 changed files with 14 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
###
function Get-VSWhere {
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe";
$vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
if (-not (Test-Path $vswhere )) {
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
@@ -34,9 +34,11 @@ function Invoke-Environment
}
function Get-VSInstallationPath {
Write-Host "ProgramFiles(x86) - ${env:ProgramFiles(x86)}"
$vswhere = Get-VSWhere
Write-Host "vswhere - $vswhere"
$installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
Write-Host "installationPath - $installationPath"
return $installationPath
}