-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show installations status for cask dependencies
- Loading branch information
1 parent
90a90b3
commit 1e7b9f4
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# typed: true | ||
# frozen_string_literal: true | ||
|
||
module Utils | ||
# Helper functions for formula and cask info. | ||
module Info | ||
def self.decorate_dependencies(dependencies) | ||
deps_status = dependencies.map do |dep| | ||
if dep.satisfied?([]) | ||
pretty_installed(dep_display_s(dep)) | ||
else | ||
pretty_uninstalled(dep_display_s(dep)) | ||
end | ||
end | ||
deps_status.join(", ") | ||
end | ||
end | ||
end |