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
84754716
Commit
84754716
authored
12 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
doctor: rename path_folders to paths
parent
17808550
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
+7
-5
7 additions, 5 deletions
Library/Homebrew/cmd/doctor.rb
with
7 additions
and
5 deletions
Library/Homebrew/cmd/doctor.rb
+
7
−
5
View file @
84754716
...
@@ -46,9 +46,10 @@ def remove_trailing_slash s
...
@@ -46,9 +46,10 @@ def remove_trailing_slash s
end
end
def
path_folders
def
paths
@path_folders
||=
ENV
[
'PATH'
].
split
(
':'
).
collect
do
|
p
|
@paths
||=
ENV
[
'PATH'
].
split
(
':'
).
collect
do
|
p
|
begin
remove_trailing_slash
(
File
.
expand_path
(
p
))
begin
remove_trailing_slash
(
File
.
expand_path
(
p
))
rescue
ArgumentError
rescue
ArgumentError
onoe
"The following PATH component is invalid:
#{
p
}
"
onoe
"The following PATH component is invalid:
#{
p
}
"
end
end
...
@@ -439,7 +440,8 @@ def check_user_path_1
...
@@ -439,7 +440,8 @@ def check_user_path_1
out
=
nil
out
=
nil
path_folders
.
each
do
|
p
|
case
p
paths
.
each
do
|
p
|
case
p
when
'/usr/bin'
when
'/usr/bin'
seen_usr_bin
=
true
seen_usr_bin
=
true
unless
$seen_prefix_bin
unless
$seen_prefix_bin
...
@@ -582,7 +584,7 @@ def check_for_config_scripts
...
@@ -582,7 +584,7 @@ def check_for_config_scripts
whitelist
=
%W[/usr/bin /usr/sbin /usr/X11/bin /usr/X11R6/bin /opt/X11/bin
#{
HOMEBREW_PREFIX
}
/bin
#{
HOMEBREW_PREFIX
}
/sbin]
whitelist
=
%W[/usr/bin /usr/sbin /usr/X11/bin /usr/X11R6/bin /opt/X11/bin
#{
HOMEBREW_PREFIX
}
/bin
#{
HOMEBREW_PREFIX
}
/sbin]
whitelist
.
map!
{
|
d
|
d
.
downcase
}
whitelist
.
map!
{
|
d
|
d
.
downcase
}
path
_folder
s
.
each
do
|
p
|
paths
.
each
do
|
p
|
next
if
whitelist
.
include?
p
.
downcase
next
if
whitelist
.
include?
p
.
downcase
next
if
p
=~
%r[^(
#{
real_cellar
.
to_s
}
|
#{
HOMEBREW_CELLAR
.
to_s
}
)]
if
real_cellar
next
if
p
=~
%r[^(
#{
real_cellar
.
to_s
}
|
#{
HOMEBREW_CELLAR
.
to_s
}
)]
if
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