Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
245838d8
Commit
245838d8
authored
8 years ago
by
Andrew Janke
Browse files
Options
Downloads
Patches
Plain Diff
info: print requirements
parent
8e9a9b64
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cmd/info.rb
+16
-1
16 additions, 1 deletion
Library/Homebrew/cmd/info.rb
with
16 additions
and
1 deletion
Library/Homebrew/cmd/info.rb
+
16
−
1
View file @
245838d8
...
...
@@ -45,7 +45,7 @@ module Homebrew
end
else
ARGV
.
named
.
each_with_index
do
|
f
,
i
|
puts
unless
i
.
zero?
puts
unless
i
==
0
begin
if
f
.
include?
(
"/"
)
||
File
.
exist?
(
f
)
info_formula
Formulary
.
factory
(
f
)
...
...
@@ -146,6 +146,14 @@ module Homebrew
end
end
unless
f
.
requirements
.
to_a
.
empty?
ohai
"Requirements"
%w[build required recommended optional]
.
map
do
|
type
|
reqs
=
f
.
requirements
.
select
(
&
:"
#{
type
}
?"
)
puts
"
#{
type
.
capitalize
}
:
#{
decorate_requirements
(
reqs
)
}
"
unless
reqs
.
to_a
.
empty?
end
end
unless
f
.
options
.
empty?
ohai
"Options"
Homebrew
.
dump_options_for_formula
f
...
...
@@ -161,4 +169,11 @@ module Homebrew
end
deps_status
*
", "
end
def
decorate_requirements
(
requirements
)
req_status
=
requirements
.
collect
do
|
req
|
req
.
satisfied?
?
pretty_installed
(
req
.
name
)
:
pretty_uninstalled
(
req
.
name
)
end
req_status
*
", "
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment