Skip to content

Fix ICU detection to use actual installed version on macOS#198

Merged
tenderlove merged 1 commit intobrianmario:masterfrom
stanhu:sh-improve-homebrew-checking
Jan 12, 2026
Merged

Fix ICU detection to use actual installed version on macOS#198
tenderlove merged 1 commit intobrianmario:masterfrom
stanhu:sh-improve-homebrew-checking

Conversation

@stanhu
Copy link
Copy Markdown
Contributor

@stanhu stanhu commented Dec 4, 2025

The previous implementation used brew --prefix icu4c which returns the path where the latest icu4c package would be installed, not necessarily where an installed version actually exists.

If a user has an older versioned package installed (e.g., icu4c@77), the path /opt/homebrew/opt/icu4c would not exist, causing the build to fail.

This change:

  • Detects all installed icu4c packages (including versioned ones)
  • Selects the latest installed version
  • Uses that version's actual installation path

This ensures the build works correctly when users have versioned ICU packages installed via Homebrew.

The previous implementation used `brew --prefix icu4c` which returns
the path where the latest icu4c package would be installed, not
necessarily where an installed version actually exists.

If a user has an older versioned package installed (e.g., icu4c@77),
the path `/opt/homebrew/opt/icu4c` would not exist, causing the
build to fail.

This change:

- Detects all installed icu4c packages (including versioned ones)
- Selects the latest installed version
- Uses that version's actual installation path

This ensures the build works correctly when users have versioned
ICU packages installed via Homebrew.
@stanhu stanhu force-pushed the sh-improve-homebrew-checking branch from 2ea9206 to b8a81e0 Compare December 4, 2025 04:13
@stanhu
Copy link
Copy Markdown
Contributor Author

stanhu commented Dec 5, 2025

@tenderlove Could I trouble you for a review and release for this? It seems that many of my team members are getting bit by this problem now that Homebrew released icu4c 78. Thank you!

@tenderlove tenderlove merged commit 758b2f3 into brianmario:master Jan 12, 2026
7 checks passed
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.

2 participants