-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Wrong tap when listing installed casks from custom taps using --json=v2 --installed
#17416
Comments
brew/Library/Homebrew/cask/caskroom.rb Lines 57 to 66 in e8430b2
This is the method that is used to load installed casks in the We do store the original caskfile that was used during installation so we could potentially try to get the full token from there. At the end of the day, this sort of situation will eventually be elegantly handled by adding an install receipt for casks (see #17013). |
Tested and working! (Although apparently it only works for newly installed casks) Carlos in MacBook in ~
⌘ brew update
==> Updating Homebrew...
==> Updated Homebrew from 4.3.19 (81bac6c27e) to 4.3.21 (9042eb9347).
No changes to formulae or casks.
The 4.3.21 changelog can be found at:
https://github.com/Homebrew/brew/releases/tag/4.3.21
Carlos in MacBook in ~
⌘ brew info --json=v2 --installed | jq -r '.casks[] | select(.token == "salt") | .tap'
homebrew/cask
Carlos in MacBook in ~
⌘ brew uninstall --cask salt
==> Uninstalling Cask salt
==> Removing launchctl service com.saltstack.salt.api
Password:
==> Removing launchctl service com.saltstack.salt.master
==> Removing launchctl service com.saltstack.salt.minion
==> Removing launchctl service com.saltstack.salt.syndic
==> Uninstalling packages with sudo; the password may be necessary:
com.saltstack.salt
==> Purging files for version 3007.1 of Cask salt
Carlos in MacBook in ~
⌘ brew install --cask cdalvaro/tap/salt
==> Caveats
Included services:
sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.api.plist
sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.master.plist
sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.minion.plist
sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist
==> Downloading https://repo.saltproject.io/salt/py3/macos/minor/3007.1/salt-3007.1-py3-arm64.pkg
################################################################################################################################ 100.0%
==> Installing Cask salt
==> Running installer for salt with sudo; the password may be necessary.
Password:
installer: Package name is Salt 3007.1 (Python 3)
installer: Installing at base path /
installer: The install was successful.
🍺 salt was successfully installed!
Carlos in MacBook in ~
⌘ brew info --json=v2 --installed | jq -r '.casks[] | select(.token == "salt") | .tap'
cdalvaro/tap Let's go! 🚀 Thank you team! |
Yes, unfortunately, this will continue to be true. Before, we did not save any information about cask installs except for the cask file, which isn't enough on its own to determine which tap it came from. Now, all cask installs also write an Unfortunately, the only way to populate this file is to reinstall the cask (because otherwise we have the same problem of not knowing what tap it came from) |
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)?
I'm trying to list all my installed formulae and casks, and looking for their corresponding taps using the command:
brew info --json=v2 --installed
.However, I have discovered that casks from custom taps have
homebrew/cask
as the assigned tap. (This may only happens with casks that are also available from thehomebrew/cask
tap. Currently, I only have two casks in my custom tapcdalvaro/tap
, but they are available at the official repository too).I'm improving the
mac_brew_pkg
module for salt (saltstack/salt#66611) and I have encountered this issue writing some tests.What happened (include all command output)?
After installing a cask from a custom tap:
The tap information is wrong when it is queried using:
brew info --json=v2 --installed
What did you expect to happen?
I expected to see
cdalvaro/tap
as the tap for thesalt
cask.Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: