Open dalisoft opened 2 years ago
I ran into this same issue.
I ran mas list
and noticed an ID for a manually-installed App was missing (eg: 123456). I then ran mas info 123456
after which it started appearing in subsequent mas list
runs (without a reboot).
Requires reboot system to properly returning result
Could you check next time, if mas outdated
fixes it for you instead of reboot?
@StefanLobbenmeier Yes, today tested it again, it works, but not properly as excepted. Some apps shows other versions rather than latest App Store
Running mas list
right after installing an app from the Mac App Store didn't include the new app in the output.
Waiting a minute, then running mas list
again included the newly installed app.
mas obtains the list of installed apps from an Apple data structure that is eventually updated, but not updated right away.
We could try to obtain installed app info from Spotlight, instead, but Spotlight doesn't include the exact app name, Spotlight probably doesn't update any faster than the data structure that we already use, and why reinvent the wheel to fix something that waiting a minute or running another innocuous command can easily fix?
That’s good to know. Does mas outdated do anything special that refreshes that file?
@StefanLobbenmeier outdated
& list
both iterate once through that data structure. They don't interact with it in any other way, nor do they interact with anything else that should influence the data structure.
info
doesn't access that data structure, nor does it even access anything from the same framework.
I assume that running anything that touches the data structure is as likely as anything else (except a logout then login, restart, or power cycle) to trigger an eventual refresh, if any such interactions trigger a refresh at all. Maybe there's a refresh command, but I don't know about one.
Either way, I think the current "solutions" of running other mas commands really just allow additional time to elapse, thus allowing an already scheduled / currently running refresh to finish.
Your Environment
mas version
: v1.8.6system_profiler SPSoftwareDataType -detailLevel mini
): 11.6.5 (20G527)mas Install Method
brew install mas
(homebrew-core).pkg
installer from releasesDescribe the Bug
Apps in App Store are not in sync with mas
To Reproduce
Steps to reproduce the behavior:
mas list
Expected Behavior
App in list of
mas list
Actual Behavior
App does not include in list
Screenshots, Terminal Output
Additional Context
Requires reboot system to properly returning result