Skip to content

Conversation

@StephenHodgson
Copy link
Member

  • hotfix unity hub installation check

- hotfix unity hub installation check
@StephenHodgson StephenHodgson marked this pull request as ready for review November 27, 2025 07:39
Copilot AI review requested due to automatic review settings November 27, 2025 07:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR provides a hotfix for the Unity Hub installation check logic by properly scoping the installedVersion variable declaration to prevent potential reference errors when the variable is used later in the auto-update flow.

  • Moved installedVersion variable declaration outside the try-catch block to ensure it's accessible throughout the Install method
  • Bumped package version from 1.6.0 to 1.6.1
  • Added unity-cli hub-version command to the workflow for better testing coverage

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/unity-hub.ts Fixed installedVersion variable scoping by declaring it at the function level and assigning it in the try block, preventing potential undefined reference errors
package.json Version bump to 1.6.1 for hotfix release
.github/workflows/unity-build.yml Added hub-version command to verify hub installation in the test workflow
Comments suppressed due to low confidence (1)

src/unity-hub.ts:299

  • The value assigned to installedVersion here is unused.
            installedVersion = await this.getInstalledHubVersion();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@StephenHodgson StephenHodgson merged commit bea6318 into main Nov 27, 2025
6 of 7 checks passed
@StephenHodgson StephenHodgson deleted the fix/installation-check branch November 27, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant