Skip to content

Commit b7af1d8

Browse files
authored
fix(ci.yml): check for null setup instance
If `$setupInstance` is not found then we must force install the base version of Unity.
1 parent baaed24 commit b7af1d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/steps/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ steps:
2121
If (!$setupInstance)
2222
{
2323
Write-Host "No Unity version specified and no Unity installation found - forcing to min supported version of 2018.3.10f1"
24-
$version = "2018.3.10f1";
24+
$version = "2018.3.10f1"
2525
}
2626
Else
2727
{
2828
Write-Host "Using already installed Unity version '$($setupInstance.Version)'."
2929
}
3030
}
3131
32-
If ($setupInstance.Version.ToString() -ne $version)
32+
If (!$setupInstance -or $setupInstance.Version.ToString() -ne $version)
3333
{
3434
Write-Host "Installing Unity version '$version'."
3535
Install-UnitySetupInstance -Installers (Find-UnitySetupInstaller -Version $version -Components "Windows")

0 commit comments

Comments
 (0)