From ae2d0fb0f8e0d81ee02a1e0535a7e6401a9e4825 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Mon, 22 Mar 2021 22:26:06 +0000 Subject: [PATCH] Fix Cask handling in `brew deps` and `brew uses`. Fixes #10906. --- Library/Homebrew/cmd/deps.rb | 8 ++++---- Library/Homebrew/cmd/uses.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index bf68924dc842f..8a5c2997abd1b 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -93,9 +93,9 @@ def deps when :formula sorted_dependents(Formula.installed) when :cask - sorted_dependents(Cask::Caskroom.casks(config: Cask::Config.from_args(args))) + sorted_dependents(Cask::Caskroom.casks) else - sorted_dependents(Formula.installed + Cask::Caskroom.casks(config: Cask::Config.from_args(args))) + sorted_dependents(Formula.installed + Cask::Caskroom.casks) end else raise FormulaUnspecifiedError @@ -118,9 +118,9 @@ def deps when :formula sorted_dependents(Formula.installed) when :cask - sorted_dependents(Cask::Caskroom.casks(config: Cask::Config.from_args(args))) + sorted_dependents(Cask::Caskroom.casks) else - sorted_dependents(Formula.installed + Cask::Caskroom.casks(config: Cask::Config.from_args(args))) + sorted_dependents(Formula.installed + Cask::Caskroom.casks) end puts_deps sorted_dependents_formulae_and_casks, recursive: recursive, args: args return diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index 42bdb33f213b9..3840aa361d3db 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -93,7 +93,7 @@ def intersection_of_dependents(use_runtime_dependents, used_formulae, args:) end if show_formulae_and_casks || args.cask? deps += select_used_dependents( - dependents(Cask::Caskroom.casks(config: Cask::Config.from_args(args))), + dependents(Cask::Caskroom.casks), used_formulae, recursive, includes, ignores ) end @@ -104,7 +104,7 @@ def intersection_of_dependents(use_runtime_dependents, used_formulae, args:) deps += args.installed? ? Formula.installed : Formula.to_a end if show_formulae_and_casks || args.cask? - deps += args.installed? ? Cask::Caskroom.casks(config: Cask::Config.from_args(args)) : Cask::Cask.to_a + deps += args.installed? ? Cask::Caskroom.casks : Cask::Cask.to_a end select_used_dependents(dependents(deps), used_formulae, recursive, includes, ignores)