brew bundle dump silently fails to include MAS apps when using mas 7+ on macOS <15
#6952
Unanswered
rgoldberg
asked this question in
Tap maintenance and Homebrew development
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am the developer of mas.
I have received reports that
brew bundle dumpsilently fails to include MAS apps when using mas 7+ on macOS <15. See:I do not have older macOS versions on which to verify, but I have no reason to believe that the reports are incorrect.
I have been informed that this is because, when called by brew, mas cannot find jq in the path because brew sets
PATH=/usr/bin:/bin:/usr/sbin:/sbin.This problem doesn't occur for macOS 15+, which include a bundled
/usr/bin/jq, which mas uses if it exists; mas only falls back to jq from the PATH when/usr/bin/jqdoesn't exist.I assume that the simplest way to solve this is for mas to support a
MAS_JQ_PATHenvironment variable, so brew could do the equivalent ofMAS_JQ_PATH=$(which jq) mas …for everymascall to a subcommand that supports--json(currently, there are only 2 such calls, one each forlist&outdated; the single call each toget&upgradeare not affected, because neither supports--json, but you could setMAS_JQ_PATH=$(which jq)for all mas calls if you want).Can Homebrew personnel either confirm that they want the aforementioned solution, or let me know if they prefer some other solution?
MAS_JQ_PATHwould also function as a workaround for other setups that also exclude jq from the PATH, and would accommodate macOS 15+ users who for some reason need to use a different jq than the bundled/usr/bin/jq(maybe the bundled jq has a bug that is fixed in a newer version).Thanks for any help.
CC: @piersolenski
Beta Was this translation helpful? Give feedback.
All reactions