Skip to content

Commit dbd77a7

Browse files
authored
Merge pull request #4 from Microsoft/fix/badProjectOutput
Detect missing project and throw
2 parents f9de6dd + 08bda74 commit dbd77a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ function Start-UnityEditor
257257
if( $Instance -eq $null )
258258
{
259259
$version = Get-UnityProjectInstance -BasePath $Project | Select-Object -First 1 -ExpandProperty UnityInstanceVersion
260+
if( !$version )
261+
{
262+
throw "Could not find Unity Project at $Project"
263+
}
260264
$Instance = Get-UnitySetupInstance | Select-UnitySetupInstance -Version $version
261265
}
262266
else

0 commit comments

Comments
 (0)