You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run brew cask install <app>, where <app> is a valid or invalid Cask name (but not an already installed Cask, which just prints the already installed method), I get a Error: 'en_GB' cannot be parsed to a Locale error message followed by a stack trace. Regular brew installs (non-cask) seem unaffected.
My region's preferred language is set to English (U.K.).
Naively, it seems like locale.rb is expecting a locale formatted like en-GB, but it is actually en_GB. I'm happy to submit a PR to fix this.
Command that failed
brew cask install lastpass
(though any valid or invalid, not yet installed, cask name triggers the failure).
Note: while the failure is coming from torbrowser.rb, this just appears to be during loading everything. Manually removing this Cask just triggers the error on another Cask.
Ok, after writing that up I discovered the issue. I had manually configured by Preferred languages using the following command: defaults write -g AppleLanguages -array "en_GB" "en_US". Other applications and macOS accepted this (appearing correctly in Language & Region), but after resetting this by reordering the list using the Language & Region preference pane, I see that macOS writes it using en-GB (dashes not underscores).
Confusingly, other defaults values (like AppleLocale) use underscores.
It looks like formally - is correct (but Java used _). Nice and consistent. We can close this as standard system locale setup will work with the existing code.
General troubleshooting steps
--force
and the issue is still present.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
When I run
brew cask install <app>
, where<app>
is a valid or invalid Cask name (but not an already installed Cask, which just prints the already installed method), I get aError: 'en_GB' cannot be parsed to a Locale
error message followed by a stack trace. Regularbrew
installs (non-cask) seem unaffected.My region's preferred language is set to English (U.K.).
Naively, it seems like locale.rb is expecting a locale formatted like
en-GB
, but it is actuallyen_GB
. I'm happy to submit a PR to fix this.Command that failed
(though any valid or invalid, not yet installed, cask name triggers the failure).
Output of command with
--force --verbose --debug
Note: while the failure is coming from
torbrowser.rb
, this just appears to be during loading everything. Manually removing this Cask just triggers the error on another Cask.Output of
brew cask doctor
Output of
brew tap
The text was updated successfully, but these errors were encountered: