-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
brew bump-formula-pr and brew bump-cask-pr fail #15342
Comments
To bump formulae or casks you need to have a local tap which is essentially a git repo with all of the package files. These then can get changed and the resulting changes pushed to the remote repos using normal git operations. These dev commands do that work for you for trivial version upgrades. The problem here is that it seems you're using the API to manage core casks and formulae. This is fine for all of the normal install, upgrade, reinstall and uninstall actions but means that you don't have local taps installed at all. Instead, you're getting the information in a bundle of JSON from the API. Long story short, it's saying here that you can't create a pull request using changes from your local tap because you don't have one. If I remember correctly you'll need to tap I wonder if this is documented anywhere already and if it'd be helpful to maybe add some better messaging here for this specific edge case. |
Agreed. This command (and others like it) should error if core/cask aren't tapped in cases like this. |
Actually, I think I misdiagnosed this. We already force It looks like the formula is not actually being loaded from a tap. It's getting loaded from the opt directory instead.
It should look something like this.
Could you maybe try running this command in the console?
|
isn’t this a consequence of the fact that my HOMEBREW_PREFIX is /opt/homebrew, which is the default on Apple Silicon I think? I tried running your commands, the cask example gives
And the formula gives:
(it starts cloning the core repo, I didn’t let it finish) |
Sorry, that the command I gave you ended up trying to clone the core formula repo. I didn't expect that to happen. It's unfortunately not that simple. There seem to be three situations that can happen with the Before I start here are my taps:
It gets loaded from
It loads the cached version of the formula/cask file as best as I can tell. This is cached during installation. It's not in a tap though so the error is appropriate but not that helpful.
We aren't able to load the formula/cask at all so it dies in the parser. It's pretty clear that the final two should have more informative errors. Neither mention the need to download a local version of a core tap. Does it even make sense to load the cached file in the case where we're forcing I wonder if we could somehow handle this inside |
Agreed 👍🏻
I don't think so.
Sounds ideal and |
I've worked on this a bit and I've got something locally that can say that a full clone is required. This linked a bit with #15049, where basically I'm moving the I'm not entirely sure on the messaging yet though. We can tell users to Currently, if you have a local tap, Not sure what the best general solution is. The bump commands are in the auto-update list so special casing is possible there, though that assumes no other command has been run recently in the auto-update interval (1 hour). We could have The question does expand a bit beyond the bump commands. For example, how should |
Some sort of
For something like |
Fixed by #15563 |
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Update the WhatsApp cask.
What happened (include all command output)?
What did you expect to happen?
I expected brew to create a PR.
Step-by-step reproduction instructions (by running
brew
commands)or
The text was updated successfully, but these errors were encountered: