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
4a4186c5
Commit
4a4186c5
authored
13 years ago
by
Adam Vandenberg
Browse files
Options
Downloads
Patches
Plain Diff
brew doctor - only check unique path folders
parent
f523662c
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/doctor.rb
+9
-6
9 additions, 6 deletions
Library/Homebrew/cmd/doctor.rb
with
9 additions
and
6 deletions
Library/Homebrew/cmd/doctor.rb
+
9
−
6
View file @
4a4186c5
...
...
@@ -28,6 +28,12 @@ def is_prefix? prefix, longer_string
longer_string
.
to_s
[
0
,
p
.
length
]
==
p
end
def
path_folders
ENV
[
'PATH'
].
split
(
':'
).
collect
{
|
p
|
File
.
expand_path
p
}.
uniq
end
# Installing MacGPG2 interferes with Homebrew in a big way
# http://sourceforge.net/projects/macgpg2/files/
def
check_for_macgpg2
...
...
@@ -240,9 +246,7 @@ def check_user_path
seen_prefix_sbin
=
false
seen_usr_bin
=
false
paths
=
ENV
[
'PATH'
].
split
(
':'
).
collect
{
|
p
|
File
.
expand_path
p
}
paths
.
each
do
|
p
|
path_folders
.
each
do
|
p
|
if
p
==
'/usr/bin'
seen_usr_bin
=
true
unless
seen_prefix_bin
...
...
@@ -375,8 +379,7 @@ def check_for_config_scripts
config_scripts
=
[]
paths
=
ENV
[
'PATH'
].
split
(
':'
).
collect
{
|
p
|
File
.
expand_path
p
}
paths
.
each
do
|
p
|
path_folders
.
each
do
|
p
|
next
if
[
'/usr/bin'
,
'/usr/sbin'
,
'/usr/X11/bin'
,
"
#{
HOMEBREW_PREFIX
}
/bin"
,
"
#{
HOMEBREW_PREFIX
}
/sbin"
].
include?
p
next
if
p
=~
%r[^(
#{
real_cellar
.
to_s
}
|
#{
HOMEBREW_CELLAR
.
to_s
}
)]
...
...
@@ -441,7 +444,7 @@ def check_for_multiple_volumes
real_cellar
=
HOMEBREW_CELLAR
.
realpath
tmp_prefix
=
ENV
[
'HOMEBREW_TEMP'
]
||
'/tmp'
tmp
=
Pathname
.
new
`/usr/bin/mktemp -d
#{
tmp_prefix
}
/homebrew-brew-doctor-XXXX`
.
strip
tmp
=
Pathname
.
new
`/usr/bin/mktemp -d
#{
tmp_prefix
}
/homebrew-brew-doctor-XXXX`
.
strip
real_temp
=
tmp
.
realpath
.
parent
where_cellar
=
volumes
.
which
real_cellar
...
...
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