Skip to content

Commit fdd210c

Browse files
committed
Check for property type before using string functions
1 parent cf2a0ee commit fdd210c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,7 @@ function Build-WiXProject() {
16301630

16311631
$MSBuildArgs = @( "-noLogo", "-maxCpuCount", "-restore", "$SourceCache\swift-installer-scripts\platforms\Windows\$FileName" )
16321632
foreach ($Property in $Properties.GetEnumerator()) {
1633-
if ($Property.Value.Contains(" ")) {
1633+
if ($Property.Value -is [string] -and $Property.Value.Contains(" ")) {
16341634
$MSBuildArgs += "-p:$($Property.Key)=$($Property.Value.Replace('\', '\\'))"
16351635
} else {
16361636
$MSBuildArgs += "-p:$($Property.Key)=$($Property.Value)"
@@ -3154,7 +3154,7 @@ function Build-Installer([Hashtable] $Platform) {
31543154
BundleFlavor = "offline";
31553155
ImageRoot = "$(Get-InstallDir $Platform)\";
31563156
INCLUDE_SWIFT_DOCC = $INCLUDE_SWIFT_DOCC;
3157-
INCLUDE_NOASSERTS = $IncludeNoAsserts
3157+
INCLUDE_NOASSERTS = $IncludeNoAsserts;
31583158
SWIFT_DOCC_BUILD = "$(Get-ProjectBinaryCache $HostPlatform DocC)\release";
31593159
SWIFT_DOCC_RENDER_ARTIFACT_ROOT = "${SourceCache}\swift-docc-render-artifact";
31603160
}

0 commit comments

Comments
 (0)