diff options
| author | Andrew Janke | 2016-10-20 10:35:05 -0400 |
|---|---|---|
| committer | GitHub | 2016-10-20 10:35:05 -0400 |
| commit | 551ce2b5d24eccc33d3013d35e8368ac6929091b (patch) | |
| tree | 4055ded2ec394be7ee9e20e5375e5b4ea25fb724 /Library | |
| parent | 2b049006fae516a30424a438f92e08acb88b6999 (diff) | |
| parent | 05a027423aeb098c6d89443ed13dde3d708e7779 (diff) | |
| download | brew-551ce2b5d24eccc33d3013d35e8368ac6929091b.tar.bz2 | |
Merge pull request #1308 from apjanke/info-with-formula-options
brew info: include options to dependencies in display
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/info.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index fefabf85f..a3062ec99 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -165,9 +165,13 @@ module Homebrew def decorate_dependencies(dependencies) deps_status = dependencies.collect do |dep| - dep.installed? ? pretty_installed(dep) : pretty_uninstalled(dep) + if dep.satisfied?([]) + pretty_installed(dep_display_s(dep)) + else + pretty_uninstalled(dep_display_s(dep)) + end end - deps_status * ", " + deps_status.join(", ") end def decorate_requirements(requirements) @@ -177,4 +181,9 @@ module Homebrew end req_status.join(", ") end + + def dep_display_s(dep) + return dep.name if dep.option_tags.empty? + "#{dep.name} #{dep.option_tags.map { |o| "--#{o}" }.join(" ")}" + end end |
