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
aeaf9af7
Commit
aeaf9af7
authored
7 years ago
by
Mike McQuaid
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2470 from johnhawkinson/conflicts-info
Display formula conflict reasons
parents
ea8be174
8e2198ff
No related branches found
Branches containing commit
Tags
1.2.1
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/cmd/info.rb
+10
-2
10 additions, 2 deletions
Library/Homebrew/cmd/info.rb
Library/Homebrew/formula.rb
+1
-1
1 addition, 1 deletion
Library/Homebrew/formula.rb
with
11 additions
and
3 deletions
Library/Homebrew/cmd/info.rb
+
10
−
2
View file @
aeaf9af7
...
...
@@ -123,8 +123,16 @@ module Homebrew
puts
f
.
desc
if
f
.
desc
puts
Formatter
.
url
(
f
.
homepage
)
if
f
.
homepage
conflicts
=
f
.
conflicts
.
map
(
&
:name
).
sort!
puts
"Conflicts with:
#{
conflicts
*
", "
}
"
unless
conflicts
.
empty?
conflicts
=
f
.
conflicts
.
map
do
|
c
|
reason
=
" (because
#{
c
.
reason
}
)"
if
c
.
reason
"
#{
c
.
name
}#{
reason
}
"
end
.
sort!
unless
conflicts
.
empty?
puts
<<-
EOS
.
undent
Conflicts with:
#{
conflicts
.
join
(
"
\n
"
)
}
EOS
end
kegs
=
f
.
installed_kegs
.
sort_by
(
&
:version
)
if
kegs
.
empty?
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/formula.rb
+
1
−
1
View file @
aeaf9af7
...
...
@@ -2366,7 +2366,7 @@ class Formula
end
# If this formula conflicts with another one.
# <pre>conflicts_with "imagemagick", :because => "because
this is just a stupid example
"</pre>
# <pre>conflicts_with "imagemagick", :because => "because
both install 'convert' binaries
"</pre>
def
conflicts_with
(
*
names
)
opts
=
names
.
last
.
is_a?
(
Hash
)
?
names
.
pop
:
{}
names
.
each
{
|
name
|
conflicts
<<
FormulaConflict
.
new
(
name
,
opts
[
:because
])
}
...
...
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