Skip to content

Commit 1cff3ea

Browse files
Apply suggestions from code review
1 parent b5e85bb commit 1cff3ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class UnitySetupInstance {
5555
$modules = (Get-Content "$path\modules.json" -Raw) | ConvertFrom-Json
5656

5757
foreach ( $module in $modules ) {
58-
$match = $module.DownloadUrl -match "(\d+)\.(\d+)\.(\d+)([fpb])(\d+)" | Out-Null
58+
$match = $module.DownloadUrl -match "(\d+)\.(\d+)\.(\d+)([fpab])(\d+)" | Out-Null
5959

6060
if ( $null -ne $match ) {
6161
$this.Version = [UnityVersion]$match
@@ -73,7 +73,7 @@ class UnitySetupInstance {
7373
}
7474
}
7575

76-
if ( -not $this.Version ) {
76+
if ( $this.Version -ne $null ) {
7777
throw "Failed to find a valid version identifier for installation at $path!";
7878
}
7979

0 commit comments

Comments
 (0)