[Git Repo] Homebrew formula cannot git clone as HEAD points to master and not the main branch
Closed this issue · 5 comments
Homebrew formula fails to clone this repo
Installing cowsay-files
the git clone fails it still looks for the master branch when the cow-files repo has been changed to main
fatal: Remote branch master not found in upstream origin
Error: cowsay-files: Failed to download resource "cowsay-files”
Can you please change the repo HEAD to point to main please?
/cowsay-org/homebrew-cowsay/Formula/cowsay-files.rb
Hi @andrewcrook. I don't belong to @cowsay-org. Tagging @apjanke as the developer of the file you linked.
I'm closing this, as no changes are required here.
@andrewcrook the default branch here is main
. I see --branch master
in your code snippet, so there must be somewhere that is assuming master
is the default branch.
@andrewcrook a quick skim of https://docs.brew.sh/Formula-Cookbook suggests there are ways to specify which branch the homebrew formula uses. Please open an issue or PR in https://github.com/cowsay-org/homebrew-cowsay!
Apologies, brew is working different to what I expected I thought HEAD referred to --HEAD which should use the default branch i.e the HEAD ref being main on this repo seems that brew forces master. Anyway I have created a pull request that fixes it. Thanks.
Yep, I'm the right contact for @cowsay-org and that https://github.com/cowsay-org/homebrew-cowsay repo. Thanks for the referral here.
Merged a fix for this from cowsay-org/homebrew-cowsay#1, using andrewcrook's fix. Looks to me like Homebrew's brew
tool assumes that the default branch for "HEAD" formula's source repos is "master" and can't handle a default branch named "main", even though that's common these days. (Or maybe my original formula was obsolete in some way.)
Thanks, y'all!