Skip to content

Commit 07e6e52

Browse files
committed
Check for property type before using string functions
1 parent d00c430 commit 07e6e52

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
@@ -1693,7 +1693,7 @@ function Build-WiXProject() {
16931693

16941694
$MSBuildArgs = @( "-noLogo", "-maxCpuCount", "-restore", "$SourceCache\swift-installer-scripts\platforms\Windows\$FileName" )
16951695
foreach ($Property in $Properties.GetEnumerator()) {
1696-
if ($Property.Value.Contains(" ")) {
1696+
if ($Property.Value -is [string] -and $Property.Value.Contains(" ")) {
16971697
$MSBuildArgs += "-p:$($Property.Key)=$($Property.Value.Replace('\', '\\'))"
16981698
} else {
16991699
$MSBuildArgs += "-p:$($Property.Key)=$($Property.Value)"
@@ -3272,7 +3272,7 @@ function Build-Installer([Hashtable] $Platform) {
32723272
BundleFlavor = "offline";
32733273
ImageRoot = "$(Get-InstallDir $Platform)\";
32743274
INCLUDE_SWIFT_DOCC = $INCLUDE_SWIFT_DOCC;
3275-
INCLUDE_NOASSERTS = $IncludeNoAsserts
3275+
INCLUDE_NOASSERTS = $IncludeNoAsserts;
32763276
SWIFT_DOCC_BUILD = "$(Get-ProjectBinaryCache $HostPlatform DocC)\release";
32773277
SWIFT_DOCC_RENDER_ARTIFACT_ROOT = "${SourceCache}\swift-docc-render-artifact";
32783278
}

0 commit comments

Comments
 (0)