brew install
For example if this is for a really old keg, keg where a user has manually removed stuff or used `brew diy`.
In this case `HOMEBREW_VERSION` is `>1.1.0 (no git repository)` so these tests failed. This was the cause of the Homebrew/homebrew-test-bot Linux CI failures as it was testing a shallow clone.