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

mac-storage-manager 2.0.1: new formula #209312

Closed
wants to merge 2 commits into from

Conversation

NarekMosisian
Copy link

This formula adds mac-storage-manager, a cross-platform shell script that helps reclaim disk space by identifying and safely removing large applications (including associated files).

Project Links:

Why it's useful:

  • Supports both macOS and Linux (though Homebrew is primarily macOS-focused).
  • Provides an interactive interface for uninstalling applications and optionally removing associated files (e.g., caches, logs).
  • Includes an optional “sudo find” step for thorough system-wide searches.

Testing:

  • brew install --build-from-source mac-storage-manager succeeds locally.
  • brew audit --strict mac-storage-manager passes without issues.

Thank you for reviewing this submission!

@github-actions github-actions bot added automerge-skip `brew pr-automerge` will skip this pull request new formula PR adds a new formula to Homebrew/homebrew-core labels Feb 28, 2025
Copy link
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

Comment on lines +6 to +10
license "AGPL-3.0-only"
depends_on "jq"
depends_on "newt"
def install
folder = "mac-storage-manager-2.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
license "AGPL-3.0-only"
depends_on "jq"
depends_on "newt"
def install
folder = "mac-storage-manager-2.0.0"
license "AGPL-3.0-only"
depends_on "jq"
depends_on "newt"
def install
folder = "mac-storage-manager-2.0.0"

depends_on "newt"
def install
folder = "mac-storage-manager-2.0.0"
folder = "." unless File.directory?(folder)
Copy link
Member

Choose a reason for hiding this comment

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

Why wouldn't it be?

Comment on lines +17 to +22
(bin/"mac-storage-manager").write <<~EOS
#!/bin/sh
export MAC_STORAGE_MANAGER_SHARE="#{pkgshare}"
exec #{libexec}/application_size_checker.sh "$@"
EOS
(bin/"mac-storage-manager").chmod 0755
Copy link
Member

Choose a reason for hiding this comment

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

This should use write_env_script

(bin/"mac-storage-manager").chmod 0755
end
test do
output = shell_output("#{bin}/mac-storage-manager --help")
Copy link
Member

Choose a reason for hiding this comment

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

We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook.

In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.

  • Then you can check that the output is as expected (with assert_equal or assert_match on the output of shell_output)
  • You can also check that an output file was created, if that is expected: assert_predicate testpath/"output.txt", :exist?

Some advice for specific cases:

  • If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
  • If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
  • If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
  • Same if the software requires a virtual machine, docker instance, etc. to be running.

@@ -0,0 +1,28 @@
class MacStorageManager < Formula
desc "Cross-platform tool to reclaim disk space by removing large applications"
homepage "https://github.com/NarekMosisian/mac-storage-manager"
Copy link
Member

Choose a reason for hiding this comment

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

We frown on authors submitting their own work unless it is very popular.

https://docs.brew.sh/Acceptable-Formulae#niche-or-self-submitted-stuff

@SMillerDev
Copy link
Member

Hi, this seems like a nice software, but not notable enough for us to package in Homebrew for now. This is not a decision on the merits of the software, but we cannot distribute every single piece of software and have to draw a line on “notability” somewhere. Of course, we would be happy to reconsider in the future.

Please consider hosting it in a personal tap, which is very easy to do: https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

@SMillerDev SMillerDev closed this Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request new formula PR adds a new formula to Homebrew/homebrew-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants