File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 4949 run : |
5050 unity-cli hub-install --hub-version 3.12.0
5151 unity-cli hub-install --auto-update
52+ unity-cli hub-version
5253 if [ "${{ matrix.unity-version }}" != "none" ]; then
5354 unity-cli setup-unity --unity-version "${{ matrix.unity-version }}" --build-targets "${{ matrix.build-target }}" --json
5455 fi
Original file line number Diff line number Diff line change 11{
22 "name" : " @rage-against-the-pixel/unity-cli" ,
3- "version" : " 1.6.0 " ,
3+ "version" : " 1.6.1 " ,
44 "description" : " A command line utility for the Unity Game Engine." ,
55 "author" : " RageAgainstThePixel" ,
66 "license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -292,15 +292,21 @@ export class UnityHub {
292292 }
293293
294294 let isInstalled = false ;
295+ let installedVersion : SemVer | undefined = undefined ;
296+
295297 try {
296298 await fs . promises . access ( this . executable , fs . constants . X_OK ) ;
299+ installedVersion = await this . getInstalledHubVersion ( ) ;
297300 isInstalled = true ;
298301 } catch {
299302 await this . installHub ( version ) ;
300303 }
301304
302305 if ( isInstalled && autoUpdate ) {
303- const installedVersion : SemVer = await this . getInstalledHubVersion ( ) ;
306+ if ( ! installedVersion ) {
307+ installedVersion = await this . getInstalledHubVersion ( ) ;
308+ }
309+
304310 this . logger . ci ( `Installed Unity Hub version: ${ installedVersion . version } ` ) ;
305311 let versionToInstall : SemVer | null = null ;
306312
You can’t perform that action at this time.
0 commit comments