From e7b71eef22217b7ccab0459530e40cd296f09429 Mon Sep 17 00:00:00 2001 From: Logicer <81077770+Logicer16@users.noreply.github.com> Date: Fri, 31 Dec 2021 11:51:18 +1100 Subject: [PATCH] autoremove: Return when not removing --- Library/Homebrew/cmd/autoremove.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/autoremove.rb b/Library/Homebrew/cmd/autoremove.rb index f7672e4aec035..32162dd1e2f4c 100644 --- a/Library/Homebrew/cmd/autoremove.rb +++ b/Library/Homebrew/cmd/autoremove.rb @@ -34,13 +34,14 @@ def autoremove args = autoremove_args.parse removable_formulae = get_removable_formulae(Formula.installed) - return if removable_formulae.blank? if (casks = Cask::Caskroom.casks.presence) removable_formulae -= casks.flat_map { |cask| cask.depends_on[:formula] } .compact .map { |formula| Formula[formula] } end + return if removable_formulae.blank? + formulae_names = removable_formulae.map(&:full_name).sort verb = args.dry_run? ? "Would uninstall" : "Uninstalling"