Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils/analytics: don't fail on invalid version #16257

Merged
merged 2 commits into from Nov 30, 2023

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Nov 26, 2023

If the git repo is broken, HOMEBREW_VERSION could be set to:

HOMEBREW_VERSION=">=2.5.0 (shallow or no git repository)"

This causes an error in utils/analytics which expects HOMEBREW_VERSION to match a regex, and therefore breaks any formula installs. Avoid that by defaulting to "unknown" if the fallback HOMEBREW_VERSION is detected.

I've seen two reports of this in two days - not entirely sure why it's suddenly come up.

Library/Homebrew/utils/analytics.rb Outdated Show resolved Hide resolved
Library/Homebrew/utils/analytics.rb Outdated Show resolved Hide resolved
Library/Homebrew/utils/analytics.rb Outdated Show resolved Hide resolved
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks @Bo98. Added a bump to brew.sh too just while we're here.

@MikeMcQuaid MikeMcQuaid merged commit 14a59d3 into Homebrew:master Nov 30, 2023
27 checks passed
@Bo98 Bo98 deleted the analytics-version-fix branch November 30, 2023 13:16
@github-actions github-actions bot added the outdated PR was locked due to age label Dec 31, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants