Closed gromgit closed 4 years ago
Yikes! I don't suppose there's a way to get it to fail only itself, is there? Or does opoo
do that?
If you define an install
stanza like every other formula, and odie
inside it, that should only trigger on a brew install/upgrade
. opoo
basically does print WARNING
, which odie
is print ERROR; exit 1
.
That said, I think the way you're doing it now is probably better, since it keeps bugging the user to take corrective action. Otherwise, if you decide (reasonably) to remove the master
branch at some point, everyone who's still on the master
branch will be stuck. With the current formula, you can simply update the text to say that you'll be removing the master
branch on a certain date, and everyone gets "blasted" with that message after a brew update
.
I imagine a bunch of projects are going to run into this; I myself copied it from twilio (See #48) for details. Might be useful for there to be some way to tell homebrew that a project has moved to a new location and/or branch. If, for example, there was a file I could just stick in the master branch that tells homebrew that the project has moved,, and brew would know to either change to the new branch or to clone from a different location, updating the reference automatically.
OTOH, that could also be the vector for abuse, in case someone took over a project and put in a redirect without the author's knowledge. Even if the author eventually noticed and fixed/removed the redirect, the project would be stuck with the exploit URL. :-(
Homebrew will load all formulae during most operations, so a user still on the
master
branch can't follow your upgrade instructions, becauseodie
killsbrew
prematurely.Addresses https://discourse.brew.sh/t/stuck-with-sqitch/8614