Skip to content

Commit 6c39035

Browse files
authored
Merge pull request #70 from jwittner/dev/warnOnMissingComponents
Write a warning if a component is not found
2 parents fddac5b + 317ef6b commit 6c39035

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ function Find-UnitySetupInstaller
259259
else {
260260
$knownBaseUrls = $knownBaseUrls | Sort-Object -Property @{ Expression={[math]::Abs(($_.CompareTo($linkComponents[0])))}; Ascending=$true}
261261
}
262-
262+
263263
$installerTemplates.Keys |
264264
Where-Object { $Components -band $_ } |
265265
ForEach-Object {
@@ -285,12 +285,17 @@ function Find-UnitySetupInstaller
285285
}
286286
}
287287

288-
if( $result ) {
289-
$result
290-
break
291-
}
288+
if( $result ) { break }
289+
}
290+
291+
if( -not $result )
292+
{
293+
Write-Warning "Unable to find installer for the $_ component."
292294
}
295+
else { $result }
296+
293297
} | Sort-Object -Property ComponentType
298+
294299
}
295300

296301
<#

0 commit comments

Comments
 (0)