Description
zerobrew fails to install sketchybar from the FelixKratz/formulae tap repository, but the main issue is that the original Ruby exception is returned directly to the user instead of being wrapped into a zerobrew-level error.
The original Homebrew setup guide uses a tap-first flow:
brew tap FelixKratz/formulae
brew install sketchybarWith zerobrew, the equivalent tap formula install was attempted as:
zb install felixkratz/formulae/sketchybarThe formula references Homebrew's MacOS constant, which is not available in the zerobrew shim/runtime. As a result, Ruby raises a raw NameError:
uninitialized constant Sketchybar::MacOS (NameError)This raw exception leaks implementation details from the Ruby shim:
/opt/zerobrew/tmp/build/sketchybar/zerobrew_shim.rb:622:in `<main>'Upstream Homebrew installation guide
brew tap FelixKratz/formulae
brew install sketchybarZerobrew command
zb install felixkratz/formulae/sketchybarActual behavior
The command fails with an unwrapped Ruby exception:
/opt/zerobrew/tmp/rb_cache/https:__raw.githubusercontent.com_felixkratz_homebrew-formulae_master_sketchybar.rb:24:in `install': uninitialized constant Sketchybar::MacOS (NameError)
from /opt/zerobrew/tmp/build/sketchybar/zerobrew_shim.rb:622:in `<main>'The same raw exception is repeated several times in the output.
Expected behavior
zerobrew should catch this kind of tap formula/shim failure and return a wrapped, user-facing error, for example:
Error: formula from tap FelixKratz/formulae uses unsupported Homebrew API: MacOSor a more generic compatibility error:
Error: this tap formula is not compatible with zerobrew because it uses unsupported Homebrew Ruby APIs.The original Ruby backtrace could still be available in debug/verbose mode, but should not be the primary error shown to the user.
Full output
==> Installing felixkratz/formulae/sketchybar...
==> Resolving dependencies (1 packages)...
• sketchybar 2.23.0
==> Downloading and installing formulas...
/opt/zerobrew/tmp/rb_cache/https:__raw.githubusercontent.com_felixkratz_homebrew-formulae_master_sketchybar.rb:24:in `install': uninitialized constant Sketchybar::MacOS (NameError)
from /opt/zerobrew/tmp/build/sketchybar/zerobrew_shim.rb:622:in `<main>'
==> Building sketchybar 2.23.0
Note: This package can't be installed with zerobrew.
Error: source build failed (exit code: Some(1))
/opt/zerobrew/tmp/rb_cache/https:__raw.githubusercontent.com_felixkratz_homebrew-formulae_master_sketchybar.rb:24:in `install': uninitialized constant Sketchybar::MacOS (NameError)
from /opt/zerobrew/tmp/build/sketchybar/zerobrew_shim.rb:622:in `<main>'
Try installing with Homebrew instead:
brew install felixkratz/formulae/sketchybar
error: source build failed (exit code: Some(1))
/opt/zerobrew/tmp/rb_cache/https:__raw.githubusercontent.com_felixkratz_homebrew-formulae_master_sketchybar.rb:24:in `install': uninitialized constant Sketchybar::MacOS (NameError)
from /opt/zerobrew/tmp/build/sketchybar/zerobrew_shim.rb:622:in `<main>'Notes
The install failure itself may be expected if MacOS is currently unsupported.
The bug is that the low-level Ruby NameError is exposed directly instead of being normalized into a clear zerobrew error for an unsupported tap formula.
Activity
0No activity yet.