Skip to content

Skip TestFlight apps in cleanup#22439

Merged
MikeMcQuaid merged 1 commit into
mainfrom
fix-mas-cleanup-zero-id
May 28, 2026
Merged

Skip TestFlight apps in cleanup#22439
MikeMcQuaid merged 1 commit into
mainfrom
fix-mas-cleanup-zero-id

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

Fixes #22437

  • Avoid uninstalling mas list entries with id zero because TestFlight apps cannot be represented in a Brewfile.
  • Cover cleanup candidates so mas uninstall 0 is not attempted.

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

OpenAI Codex 5.5 xhigh with local testing and review.


- Avoid uninstalling `mas list` entries with `id` zero because
  TestFlight apps cannot be represented in a `Brewfile`.
- Cover cleanup candidates so `mas uninstall 0` is not attempted.
Copilot AI review requested due to automatic review settings May 28, 2026 18:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Brew Bundle’s Mac App Store cleanup logic to avoid treating TestFlight-installed apps (reported by mas list with id=0) as removable candidates, preventing mas uninstall 0 from being executed during brew bundle cleanup --mas.

Changes:

  • Exclude mas list entries with id=0 from MAS cleanup candidates.
  • Extend the MAS bundle cleanup spec to include an id=0 app and assert it is not selected/uninstalled.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/bundle/extensions/mac_app_store.rb Filters out id=0 MAS entries when computing cleanup candidates.
Library/Homebrew/test/bundle/mac_app_store_spec.rb Adds coverage ensuring id=0 entries are not included in cleanup/uninstall flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MikeMcQuaid MikeMcQuaid enabled auto-merge May 28, 2026 18:23
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue May 28, 2026
Merged via the queue into main with commit edf610a May 28, 2026
39 checks passed
@MikeMcQuaid MikeMcQuaid deleted the fix-mas-cleanup-zero-id branch May 28, 2026 19:29
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

Successfully merging this pull request may close these issues.

Cleanup uninstalls TestFlight apps (mas list id=0)

3 participants