I previously wrote about how to install older versions of homebrew packages. That method involves installing a package from a Ruby file but it’s outdated and doesn’t always work. There’s a better way with brew extract, although it still comes with caveats. I’ll be using hugo as an example. Let’s say I wanted to install v0.145.0 because v0.146.0 introduced breaking changes that broke my theme. tl;dr:To install hugo v0.145.0: Create a local tap with brew tap-new $USER/local Tap homebrew/core which is a 1.3GB clone at the time of writing Extract the formula with brew extract Patch the hugo formula. This isn’t needed for every formula. Install as usual Note that this process will point your hugo command to the older version, but you can switch between versions with brew link. Create a local tap Run brew tap-new $USER/local $ brew tap-new $USER/local Initialized empty Git repository in /opt/homebrew/Library/Taps/nelson/homebrew-local/.git/ [main (root-commit) 6af371f] Create nelson/local…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.