@@ -821,7 +821,8 @@ function Invoke-IsolatingEnvVars([scriptblock]$Block) {
821
821
822
822
function Invoke-VsDevShell ([Hashtable ] $Platform ) {
823
823
if (($Platform.OS -ne [OS ]::Windows) -or ($BuildPlatform.OS -ne [OS ]::Windows)) {
824
- throw " Invoke-VsDevShell is only available on Windows."
824
+ Write-Warning " Invoke-VsDevShell called on non-Windows platform."
825
+ return
825
826
}
826
827
827
828
$DevCmdArguments = " -no_logo -host_arch=$ ( $BuildPlatform.Architecture.VSName ) -arch=$ ( $Platform.Architecture.VSName ) "
@@ -1105,21 +1106,20 @@ function Get-PinnedToolchainToolsDir() {
1105
1106
}
1106
1107
1107
1108
return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $PinnedToolchain ,
1108
- " Library" , " Developer" , " Toolchains" , " unknown-$PinnedToolchainVariant -development.xctoolchain" , " usr" , " bin" )
1109
+ " Library" , " Developer" , " Toolchains" ,
1110
+ " unknown-$PinnedToolchainVariant -development.xctoolchain" , " usr" , " bin" )
1109
1111
}
1110
1112
1111
1113
function Get-PinnedToolchainSDK () {
1112
- if (Test-Path " $BinaryCache \toolchains\$PinnedToolchain \LocalApp\Programs\Swift\Platforms\$ ( Get-PinnedToolchainVersion ) \Windows.platform\Developer\SDKs\Windows.sdk" ) {
1113
- return " $BinaryCache \toolchains\$PinnedToolchain \LocalApp\Programs\Swift\Platforms\$ ( Get-PinnedToolchainVersion ) \Windows.platform\Developer\SDKs\Windows.sdk"
1114
- }
1115
- return " $BinaryCache \toolchains\$PinnedToolchain \Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk"
1114
+ return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $PinnedToolchain ,
1115
+ " LocalApp" , " Programs" , " Swift" , " Platforms" , (Get-PinnedToolchainVersion ),
1116
+ " Windows.platform" , " Developer" , " SDKs" , " Windows.sdk" )
1116
1117
}
1117
1118
1118
1119
function Get-PinnedToolchainRuntime () {
1119
- if (Test-Path " $BinaryCache \toolchains\$PinnedToolchain \LocalApp\Programs\Swift\Runtimes\$ ( Get-PinnedToolchainVersion ) \usr\bin\swiftCore.dll" ) {
1120
- return " $BinaryCache \toolchains\$PinnedToolchain \LocalApp\Programs\Swift\Runtimes\$ ( Get-PinnedToolchainVersion ) \usr\bin"
1121
- }
1122
- return " $BinaryCache \toolchains\$PinnedToolchain \PFiles64\Swift\runtime-development\usr\bin"
1120
+ return [IO.Path ]::Combine(" $BinaryCache \" , " toolchains" , $PinnedToolchain ,
1121
+ " LocalApp" , " Programs" , " Swift" , " Runtimes" , (Get-PinnedToolchainVersion ),
1122
+ " usr" , " bin" )
1123
1123
}
1124
1124
1125
1125
function Get-PinnedToolchainVersion () {
0 commit comments