Skip to content

Commit b150d4c

Browse files
committed
PR Feedback 2.
1 parent 3daeb9c commit b150d4c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

utils/build.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,8 @@ function Invoke-IsolatingEnvVars([scriptblock]$Block) {
821821

822822
function Invoke-VsDevShell([Hashtable] $Platform) {
823823
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
825826
}
826827

827828
$DevCmdArguments = "-no_logo -host_arch=$($BuildPlatform.Architecture.VSName) -arch=$($Platform.Architecture.VSName)"
@@ -1105,21 +1106,20 @@ function Get-PinnedToolchainToolsDir() {
11051106
}
11061107

11071108
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")
11091111
}
11101112

11111113
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")
11161117
}
11171118

11181119
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")
11231123
}
11241124

11251125
function Get-PinnedToolchainVersion() {

0 commit comments

Comments
 (0)