Skip to content
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

mas does not show all apps #145

Closed
rcmdnk opened this issue Feb 24, 2023 · 1 comment
Closed

mas does not show all apps #145

rcmdnk opened this issue Feb 24, 2023 · 1 comment

Comments

@rcmdnk
Copy link
Owner

rcmdnk commented Feb 24, 2023

It seems some Microsoft apps are missing in mas list.

$ mas version
1.8.6
$ mas list
1295203466  Microsoft Remote Desktop  (10.8.1)
409203825   Numbers                   (12.2.1)
408981434   iMovie                    (10.3.5)
409201541   Pages                     (12.2.1)
497799835   Xcode                     (14.2)
409183694   Keynote                   (12.2.1)
425424353   The Unarchiver            (4.3.5)
$ mdfind 'kMDItemAppStoreHasReceipt=1'
/Applications/Microsoft PowerPoint.app
/Applications/Microsoft Word.app
/Applications/Microsoft Excel.app
/Applications/Pages.app
/Applications/Keynote.app
/Applications/The Unarchiver.app
/Applications/Numbers.app
/Applications/iMovie.app
/Applications/Xcode.app
/Applications/Microsoft Remote Desktop.app

The problem was issued at: mas-cli/mas#220
but it seems the bug has not been fixed (or re-introduced...?).

Maybe better to use native mdfind command.

@rcmdnk
Copy link
Owner Author

rcmdnk commented Feb 24, 2023

apps_tmp = []

As long as checking in the current environment,
mdfind is fine and shows the same results as searching Contents/_MASReceipt/receipt.

rcmdnk added a commit that referenced this issue Feb 25, 2023
fix: combine.sh: run formatters on src/brew_file/*.py only before combine
fix: combine.sh: check imports precisely (for multiline import with bracket)
refactor: brew_file, add homebrew_tap_prefix, core_repo, cask_repo in opt
feat: brew_file: add api and cache in opt, to manage API mode, which becomes default from Homebrew 4.0.0
feat: remain homebrew/core homebrew/cask even at API mode in Brewfile. do not tap them at API mode.
fix: brew_file.get_appstore_list: use mdfind instead of mas (mdfind seems work fine for now, and finds more app than mas (e.g. Microsoft Word/Exel/PowerPoint). checking Contents/_MASReceipt/receipt method needs to assign directories, so that mdfind is better if it can detect all apps. it finds apps in trash box, too, but it can be rejected by mdls check (#145)
fix: remove brew_file.find_app, find_brew_app. instead, make token and check token in cask/formula. add generate_cask_token function to generate token, instead of using homebrew-cask's generate_cask_token (which is not available at api mode, and which does not work with Ruby 3.X) (#146)
fix: use brew info instead of reading tap's directories to find formulae/casks
fix: in addition, use $(brew --cache)/api/formula.json, cask.json to find formulae/casks for homebrew-core/cask. which is needed for api mode (currently, brew info --eval-all does not contains them at api mode) (#142)
feat: update check_casks (brew-file casklist): add app list installed from AppStore but have casks
refactor: move some basic functions to helper: get_formula_list, get_cask_list, get_info, get_formula_info, get_tap_casks, get_cask_info, get_tap_casks, get_leaves
feat: utils: add home_tilde
@rcmdnk rcmdnk closed this as completed Feb 25, 2023
rcmdnk added a commit that referenced this issue Feb 25, 2023
fix: combine.sh: run formatters on src/brew_file/*.py only before combine
fix: combine.sh: check imports precisely (for multiline import with bracket)
refactor: brew_file, add homebrew_tap_prefix, core_repo, cask_repo in opt
feat: brew_file: add api and cache in opt, to manage API mode, which becomes default from Homebrew 4.0.0
feat: remain homebrew/core homebrew/cask even at API mode in Brewfile. do not tap them at API mode.
fix: brew_file.get_appstore_list: use mdfind instead of mas (mdfind seems work fine for now, and finds more app than mas (e.g. Microsoft Word/Exel/PowerPoint). checking Contents/_MASReceipt/receipt method needs to assign directories, so that mdfind is better if it can detect all apps. it finds apps in trash box, too, but it can be rejected by mdls check (#145)
fix: remove brew_file.find_app, find_brew_app. instead, make token and check token in cask/formula. add generate_cask_token function to generate token, instead of using homebrew-cask's generate_cask_token (which is not available at api mode, and which does not work with Ruby 3.X) (#146)
fix: use brew info instead of reading tap's directories to find formulae/casks
fix: in addition, use $(brew --cache)/api/formula.json, cask.json to find formulae/casks for homebrew-core/cask. which is needed for api mode (currently, brew info --eval-all does not contains them at api mode) (#142)
feat: update check_casks (brew-file casklist): add app list installed from AppStore but have casks
refactor: move some basic functions to helper: get_formula_list, get_cask_list, get_info, get_formula_info, get_tap_casks, get_cask_info, get_tap_casks, get_leaves
refactor: remove get_tap_path, which is not needed (file searches to find formulae/casks were removed, use brew info information)
feat: utils: add home_tilde
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant