Skip to content

Commit

Permalink
Show installations status for cask dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
HaraldNordgren committed Aug 7, 2024
1 parent 9926315 commit 852e3fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Library/Homebrew/cask/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ def self.desc_info(cask)

sig { params(cask: Cask).returns(T.nilable(String)) }
def self.deps_info(cask)
require "utils/info"

depends_on = cask.depends_on

formula_deps = Array(depends_on[:formula]).map(&:to_s)
cask_deps = Array(depends_on[:cask]).map { |dep| "#{dep} (cask)" }
formula_deps = depends_on[:formula] && !depends_on[:formula].empty? ? ::Utils::Info.decorate_dependencies(depends_on[:formula]) : []
cask_deps = depends_on[:cask] && !depends_on[:cask].empty? ? ::Utils::Info.decorate_dependencies(depends_on[:cask]) : []

all_deps = formula_deps + cask_deps
return if all_deps.empty?
Expand Down

0 comments on commit 852e3fe

Please sign in to comment.