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
[Brew] Installing apps with custom Homebrew cask directory fails #25112
Installation using brew install works in Terminal, but trying to install with the extension, the install just seems to hang indefinitely. Perhaps because I lack admin permissions to install to /Applications on my work Mac?
Steps To Reproduce
Set custom Homebrew cask installation folder (e.g. ~/Applications) with no admin permissions for /Applications.
I'd like to pick this up. I reproduced what I think is happening, and have two questions to confirm it.
The extension runs brew with Raycast's environment, not your shell's. Raycast's environment has no HOMEBREW_* variables, so a HOMEBREW_CASK_OPTS="--appdir=~/Applications" set in ~/.zshrc reaches brew in Terminal but not the extension's brew, which installs to /Applications instead.
When brew can't write to the install folder, it copies the app with sudo -A. That calls the extension's askpass script, which opens a "brew: Enter login password" dialog, and the install waits for it. To check this, I set the install folder to one I can't write to and ran brew install --cask keycastr the way the extension does. brew asked for a password three times, then failed with sudo: 3 incorrect password attempts. Without admin rights, no password works, and if the dialog is behind another window, the install looks stuck.
For the fix, I'm thinking of making the install fail with a clear message instead of hanging, and possibly adding an install folder preference. @nhojb, would you take a preference for that, or would you rather point users to brew.env?
@nhojb, would you take a preference for that, or would you rather point users to brew.env?
Probably best to point users to brew.env - otherwise we end up with two sources of truth.
We could add a note to the README and possibly a note in the extension's settings. Can't remember if that is supported or not.
Activity
raycastbot commentedon Feb 3, 2026
Thank you for opening this issue!
🔔 @nhojb @Aayush9029 @mathieudutour @urwrstkn8mare @ashokbaruaakas @MillerApps @pernielsentikaer @jfkisafk @vpukhanov @j3lte @alexander-cato @ViGeng @ridemountainpig @chrismessina you might want to have a look.
💡 Author and Contributors commands
The author and contributors of
nhojb/brewcan trigger bot actions by commenting:@raycastbot close this issueCloses the issue.@raycastbot close as not plannedCloses the issue as not planned.@raycastbot close as duplicateCloses the issue as duplicate.@raycastbot rename this issue to "Awesome new title"Renames the issue.@raycastbot reopen this issueReopens the issue.@raycastbot assign meAssigns yourself to the issue.@raycastbot good first issueAdds the "Good first issue" label to the issue.@raycastbot keep this issue openMake sure the issue won't go stale and will be kept open by the bot.dibas-np commentedon Nov 4, 2026
I'd like to pick this up. I reproduced what I think is happening, and have two questions to confirm it.
The extension runs
brewwith Raycast's environment, not your shell's. Raycast's environment has noHOMEBREW_*variables, so aHOMEBREW_CASK_OPTS="--appdir=~/Applications"set in~/.zshrcreachesbrewin Terminal but not the extension'sbrew, which installs to/Applicationsinstead.When
brewcan't write to the install folder, it copies the app withsudo -A. That calls the extension's askpass script, which opens a "brew: Enter login password" dialog, and the install waits for it. To check this, I set the install folder to one I can't write to and ranbrew install --cask keycastrthe way the extension does.brewasked for a password three times, then failed withsudo: 3 incorrect password attempts. Without admin rights, no password works, and if the dialog is behind another window, the install looks stuck.@brycedriesenga, could you tell me:
HOMEBREW_CASK_OPTSin a shell file, or somewhere else?Until there's a fix, a workaround is to set the option in
~/.homebrew/brew.env, whichbrewreads however it's started:For the fix, I'm thinking of making the install fail with a clear message instead of hanging, and possibly adding an install folder preference. @nhojb, would you take a preference for that, or would you rather point users to
brew.env?nhojb commentedon Nov 4, 2026
Probably best to point users to
brew.env- otherwise we end up with two sources of truth.We could add a note to the README and possibly a note in the extension's settings. Can't remember if that is supported or not.
[Brew] Document Homebrew options in brew.env (raycast#33136)