Homebrew / homebrew-linux-fonts

🖋 Formula of F🅾𝓝𝐓𝚂 (fork of Caskroom-fonts)
BSD 2-Clause "Simplified" License
48 stars 1 forks source link

Fail when try to install any font #35

Closed robsonpeixoto closed 1 year ago

robsonpeixoto commented 1 year ago

General troubleshooting steps

Description of issue

Fail when try to install any font.

Output of your command with --verbose --debug

❯ brew install font-jetbrains-mono-nerd-font --verbose --debug
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-linux-fonts/Formula/font-jetbrains-mono-nerd-font.rb
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-linux-fonts/Formula/font-jetbrains-mono-nerd-font.rb
Error: font-jetbrains-mono-nerd-font: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-linux-fonts/Formula/font-jetbrains-mono-nerd-font.rb:1: `@4' is not allowed as an instance variable name
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-linux-fonts/Formula/font-jetbrains-mono-nerd-font.rb:1: syntax error, unexpected end-of-input, expecting ']'
... :before=>["version \"3.0.1\""@42, "sha256 \"977f16dcb70c45b...
...                              ^

Output of brew cask doctor

❯ brew cask doctor
Error: `brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead.

❯ brew doctor --cask
Usage: brew doctor, dr [--list-checks] [--audit-debug] [diagnostic_check ...]

Check your system for potential problems. Will exit with a non-zero status if
any potential problems are found. Please note that these warnings are just used
to help the Homebrew maintainers with debugging if you file an issue. If
everything you use Homebrew for is working fine: please don't worry or file an
issue; just ignore this.

      --list-checks                List all audit methods, which can be run
                                   individually if provided as arguments.
  -D, --audit-debug                Enable debugging and profiling of audit
                                   methods.
  -d, --debug                      Display any debugging information.
  -q, --quiet                      Make some output more quiet.
  -v, --verbose                    Make some output more verbose.
  -h, --help                       Show this message.
Error: invalid option: --cask

❯ brew doctor
Your system is ready to brew.
robsonpeixoto commented 1 year ago

Sorry, is not all fonts, are somes:

❯ rg --files-with-matches --fixed-strings '{:name=>'
font-victor-mono-nerd-font.rb
font-gohufont-nerd-font.rb
font-fantasque-sans-mono-nerd-font.rb
font-noto-nerd-font.rb
font-fira-mono-nerd-font.rb
font-hasklug-nerd-font.rb
font-daddy-time-mono-nerd-font.rb
font-orbit.rb
font-bagel-fat-one.rb
font-iosevka-slab.rb
font-anonymice-nerd-font.rb
font-3270-nerd-font.rb
font-grandiflora-one.rb
font-roboto-mono-nerd-font.rb
font-go-mono-nerd-font.rb
font-blex-mono-nerd-font.rb
font-bigblue-terminal-nerd-font.rb
font-liberation-nerd-font.rb
font-proggy-clean-tt-nerd-font.rb
font-caskaydia-cove-nerd-font.rb
font-droid-sans-mono-nerd-font.rb
font-inconsolata-nerd-font.rb
font-tinos-nerd-font.rb
font-fira-code-nerd-font.rb
font-ubuntu-mono-nerd-font.rb
font-monofur-nerd-font.rb
font-overpass-nerd-font.rb
font-im-writing-nerd-font.rb
font-hurmit-nerd-font.rb
font-mononoki-nerd-font.rb
font-open-dyslexic-nerd-font.rb
font-comic-shanns-mono-nerd-font.rb
font-terminess-ttf-nerd-font.rb
font-inconsolata-lgc-nerd-font.rb
font-ubuntu-nerd-font.rb
font-cousine-nerd-font.rb
font-shure-tech-mono-nerd-font.rb
font-code-new-roman-nerd-font.rb
font-profont-nerd-font.rb
font-twilio-sans-mono.rb
font-aurulent-nerd-font.rb
font-gasoek-one.rb
font-iosevka-term-nerd-font.rb
font-iosevka-nerd-font.rb
font-aurulent-sans-mono-nerd-font.rb
font-diphylleia.rb
font-bitstream-vera-sans-mono-nerd-font.rb
font-symbols-only-nerd-font.rb
font-moirai-one.rb
font-hack-nerd-font.rb
font-agave-nerd-font.rb
font-dejavu-sans-mono-nerd-font.rb
font-heavy-data-nerd-font.rb
font-lekton-nerd-font.rb
font-mplus-nerd-font.rb
font-gnu-unifont.rb
font-monoid-nerd-font.rb
font-arimo-nerd-font.rb
font-space-mono-nerd-font.rb
font-meslo-lg-nerd-font.rb
font-inconsolata-go-nerd-font.rb
font-sauce-code-pro-nerd-font.rb
font-lilex-nerd-font.rb
font-jetbrains-mono-nerd-font.rb
robsonpeixoto commented 1 year ago

The script cask2formula is not handling the comment(https://github.com/Homebrew/homebrew-cask-fonts/blob/5970659d7741831ed42dddd198bb60ced6a60501/Casks/font-jetbrains-mono-nerd-font.rb#L112) properly.

tani commented 1 year ago

Thank you for contacting me and Sorry for the late reply. Please wait a moment while we respond.

tani commented 1 year ago

We are pleased to announce that the fix is now available in the latest version. To be honest, this problem has been reported for quite some time and we had been sitting on our hands, unable to think of a fix. I am very grateful to you for pointing this out to us and we have been able to fix it!

waldyrious commented 1 year ago

For future reference, the fix was implemented in commit 98d864abe27be532144712bdd2b31e9a6eafd1b5; specifically, in the change made to the cask2formula script.

robsonpeixoto commented 1 year ago

It's working like a charm, thanks!

❯ brew install  font-jetbrains-mono-nerd-font

==> Fetching homebrew/linux-fonts/font-jetbrains-mono-nerd-font
==> Downloading https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.1/JetBrainsMono.zip
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/27574418/aa6e0b40-79a2-4e10-bb5d-54793844b3fd?X-Amz-Algo
################################################################################################################################################### 100.0%
==> Installing font-jetbrains-mono-nerd-font from homebrew/linux-fonts
🍺  /home/linuxbrew/.linuxbrew/Cellar/font-jetbrains-mono-nerd-font/3.0.1: 99 files, 184.1MB, built in 3 seconds
==> Running `brew cleanup font-jetbrains-mono-nerd-font`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).