Created
December 20, 2018 18:18
-
-
Save modille/b43af3f895a6001152bb337cd0b3c99b to your computer and use it in GitHub Desktop.
Install and pin an older version of a homebrew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find and install an OLD version of a homebrew formula | |
# and PIN it to prevent upgrading. | |
# Choose formula | |
formula=kubernetes-cli | |
# View homebrew-core git log to find a commit | |
git clone [email protected]:Homebrew/homebrew-core.git | |
cd homebrew-core | |
git log master -- "Formula/$formula.rb" | |
# Choose commit | |
sha=41764e07727d9a86b0f8a077117dc7876ca294c4 | |
# Re-install from URL | |
brew remove $formula | |
brew install "https://raw.githubusercontent.com/Homebrew/homebrew-core/$sha/Formula/$formula.rb" | |
# Pin the formula to prevent it from being upgraded | |
brew pin $formula |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment