mirror of
https://github.com/php-win-ext/setup-php-sdk.git
synced 2026-03-24 00:52:09 +01:00
Fix #4: nts builds are not supported
We must not overwrite the passed parameter, and use it afterwards.
This commit is contained in:
10
run.ps1
10
run.ps1
@@ -24,14 +24,14 @@ $toolsets = @{
|
||||
"vc14" = "14.0"
|
||||
}
|
||||
$dir = vswhere -latest -find "VC\Tools\MSVC"
|
||||
foreach ($ts in (Get-ChildItem $dir)) {
|
||||
$tsv = "$ts".split(".")
|
||||
foreach ($toolset in (Get-ChildItem $dir)) {
|
||||
$tsv = "$toolset".split(".")
|
||||
if ((14 -eq $tsv[0]) -and (9 -ge $tsv[1])) {
|
||||
$toolsets."vc14" = $ts
|
||||
$toolsets."vc14" = $toolset
|
||||
} elseif ((14 -eq $tsv[0]) -and (19 -ge $tsv[1])) {
|
||||
$toolsets."vc15" = $ts
|
||||
$toolsets."vc15" = $toolset
|
||||
} elseif (14 -eq $tsv[0]) {
|
||||
$toolsets."vs16" = $ts
|
||||
$toolsets."vs16" = $toolset
|
||||
}
|
||||
}
|
||||
$toolset = $toolsets.$vs
|
||||
|
||||
Reference in New Issue
Block a user