You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error when preventing install formula from local file #20441
Provide a detailed description of the proposed feature
There is no information about a error in executing brew install /path/to/formula.rb except "There is no formula in /path/to/formula". It will be useful to add info about HOMEBREW_DEVELOPER environment variable in case of guessing path in user's input.
What is the motivation for the feature?
I spent 2 hours to make command working which I debug yesterday. I couldn't find any info except brew version mismatch between my macbook and the other one.
How will the feature be relevant to at least 90% of Homebrew users?
90% of Homebrew users don't make formulas so...
What alternatives to the feature have been considered?
It will be useful to add info about HOMEBREW_DEVELOPER environment variable in case of guessing path in user's input.
We won't provide the environment variable as documentation as you specifically should not set it as a workaround as it changes a lot of the behaviour of Homebrew in ways you probably don't want.
I agree the error message here should/could be improved.
changed the title [-]Add hint about preventing install formula from local file with HOMEBREW_DEVELOPER[/-][+]Improve error when preventing install formula from local file[/+]on Aug 13, 2025
@fasmat Hopefully improving the error messages/instructions in #20444. the TL;DR is ensure that you're putting the formula and/or casks into a tap directory and that you're not referencing them by path but by name.
Can't debug your workflow specifically but it may be worth seeing if the change is still required after #20444 is merged. Hope that helps!
@fasmat say I have a custom formula called myformula in a tap called my/tap.
Running brew install my/tap/myformula will use the contents of the file located at $(brew --repository my/tap)/Formula/myformula.rb. Homebrew will not change the branch of your tap, it will simply use the file at that location.
@fasmat I think the issue is you're using both actions/checkout and Homebrew/actions/setup-homebrew. The latter will check out your tap for you and do all that symlinking. Give it a try.
@fasmatactions/checkout should still be unneeded but as-of #20457 things should work either way. If things are still broken for you: please shout and I'll fix.
Activity
UndefBehavior commentedon Aug 13, 2025
The commit with the new behavior: e22af1138883c892d585e215c05f63213df41050
MikeMcQuaid commentedon Aug 13, 2025
We won't provide the environment variable as documentation as you specifically should not set it as a workaround as it changes a lot of the behaviour of Homebrew in ways you probably don't want.
I agree the error message here should/could be improved.
[-]Add hint about preventing install formula from local file with HOMEBREW_DEVELOPER[/-][+]Improve error when preventing install formula from local file[/+]fasmat commentedon Aug 13, 2025
@MikeMcQuaid thanks for tagging me to this issue. The change broke my CI for my personal homebrew repository where I check the casks to see if the pass style checks and can be installed and uninstalled. The changes in PR #20414 broke my workflow and I fixed it by setting
HOMEBREW_DEVELOPERhere: https://github.com/fasmat/homebrew-trader-workstation/blob/main/.github/workflows/main.yml#L16-L17What would have been the correct fix to make for instance these step work correctly after the change? (all changes below are the same for other casks)
https://github.com/fasmat/homebrew-trader-workstation/blob/01d489dbb44ef8ec26cbf6dec5685e0d78f0eb43/.github/workflows/main.yml#L26-L51
MikeMcQuaid commentedon Aug 13, 2025
@fasmat Hopefully improving the error messages/instructions in #20444. the TL;DR is ensure that you're putting the formula and/or casks into a tap directory and that you're not referencing them by path but by name.
Can't debug your workflow specifically but it may be worth seeing if the change is still required after #20444 is merged. Hope that helps!
fasmat commentedon Aug 13, 2025
@MikeMcQuaid I'm not sure I know what to do now? My current workflow for a PR is:
how would this work with the changes? If I just
I do not install the formula from the feature branch but from main?
Rylan12 commentedon Aug 13, 2025
@fasmat say I have a custom formula called
myformulain a tap calledmy/tap.Running
brew install my/tap/myformulawill use the contents of the file located at$(brew --repository my/tap)/Formula/myformula.rb. Homebrew will not change the branch of your tap, it will simply use the file at that location.A better place to ask for specific help might be our discussions forum, where there is a "Tap maintenance and brew development" category
fasmat commentedon Aug 13, 2025
@Rylan12 thank you for your response. I'm using this inside a GitHub workflow for pull request to my tap:
brew install ./Cask/formulato check if the updated formula still installs successfullyI managed to find a workflow around this but this seems quite convoluted compared to how easy it was before:
The soft linking wasn't required before... But I guess this solves the issue without needing to set
HOMEBREW_DEVELOPER.MikeMcQuaid commentedon Aug 14, 2025
@fasmat I think the issue is you're using both
actions/checkoutandHomebrew/actions/setup-homebrew. The latter will check out your tap for you and do all that symlinking. Give it a try.MikeMcQuaid commentedon Aug 14, 2025
@fasmat I'm continuing to improve this in #20457, bear with me and apologies for the disruption.
MikeMcQuaid commentedon Aug 14, 2025
@fasmat
actions/checkoutshould still be unneeded but as-of #20457 things should work either way. If things are still broken for you: please shout and I'll fix.fasmat commentedon Aug 14, 2025
@MikeMcQuaid thanks you for your efforts!
I managed to get the workflow running as you said without having to link the workspace folder manually as tap 🥳