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

Feature Request: Add mas --exclude or Similar Option to Exclude Apps from Upgrades #723

Open
alwinsamson opened this issue Feb 21, 2025 · 2 comments

Comments

@alwinsamson
Copy link

Problem(s) addressed

Currently, mas upgrade upgrades all outdated apps, and the only way to limit upgrades is to manually specify app IDs. However, there is no built-in way to exclude certain apps from being upgraded.

For users who want to skip certain app updates, they must manually retrieve the outdated app list and filter out unwanted apps before running mas upgrade, which is inefficient.

Example of the current workaround:

## List outdated apps
$ mas outdated
123456789  AppOne (1.0 -> 1.1)
987654321  AppTwo (2.0 -> 2.1)
555666777  AppThree (3.0 -> 3.1)

## Upgrade only selected apps (manual filtering)
$ mas upgrade 555666777

This process is not user-friendly and requires extra steps for something that could be built into the tool.

Proposed solution(s)

Introduce an --exclude flag for mas upgrade, allowing users to specify apps they want to skip. For example:

## Upgrade all apps except AppOne (123456789) and AppTwo (987654321)
$ mas upgrade --exclude 123456789,987654321

Alternatively, provide an environment variable or a configuration file where users can specify globally excluded apps.

Alternative solution(s)

Allow mas outdated to support an --exclude flag, filtering out unwanted apps before displaying the list:

## Show outdated apps, excluding AppOne and AppTwo
$ mas outdated --exclude 123456789,987654321

Introduce an mas ignore command to permanently exclude apps until the user removes them from the ignore list:

## Ignore AppOne from future upgrades
$ mas ignore 123456789

## View ignored apps
$ mas ignore --list

## Remove AppOne from ignore list
$ mas ignore --remove 123456789

Support a ~/.mas_exclude config file that contains a list of excluded app IDs.

Additional context

Additional Context

  • The ability to exclude apps is useful for users who:
    • Need to delay specific updates (e.g., waiting for stability).
    • Have apps installed via mas but prefer manual updates for certain ones.
    • Want to automate upgrades without worrying about specific exclusions every time.
  • brew (Homebrew) provides an exclude feature via brew pin, which serves a similar purpose. Implementing a version of this for mas would improve usability.

This request would make mas upgrade more flexible and user-friendly, reducing the need for external scripting or workarounds.

Would love to hear your thoughts on feasibility! Thanks! 🙌

@rgoldberg
Copy link
Contributor

This sounds like a subset of version pinning, which was proposed in #386.

Does pinning meet your needs? If so, I'll close this as a duplicate.

Not sure when I'll be able to get to it.

There are no other active developers on the project; if anyone else wants to work on it, let me know & we can discuss.

@alwinsamson
Copy link
Author

Thanks for the clarification! Yes, if pinning allows us to exclude apps from updates (e.g., mas pin to block upgrades for certain apps), then this would indeed cover my use case. Feel free to close this issue as a duplicate of #386.

If there’s any way to help test. I’d be happy to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants