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
034fc40a
Commit
034fc40a
authored
15 years ago
by
Max Howell
Browse files
Options
Downloads
Patches
Plain Diff
Remove Fink and Macports from the PATH earlier
References issue Homebrew/homebrew#48
parent
a03d1308
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/brew.h.rb
+17
-0
17 additions, 0 deletions
Library/Homebrew/brew.h.rb
Library/Homebrew/brewkit.rb
+0
-8
0 additions, 8 deletions
Library/Homebrew/brewkit.rb
bin/brew
+6
-0
6 additions, 0 deletions
bin/brew
with
23 additions
and
8 deletions
Library/Homebrew/brew.h.rb
+
17
−
0
View file @
034fc40a
...
...
@@ -229,6 +229,23 @@ def diy
end
end
def fix_PATH
bad_paths = `/usr/bin/which -a port`.split
bad_paths += `/usr/bin/which -a fink`.split
# don't remove standard paths!
bad_paths.delete_if do |pn|
%w[/usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/X11/bin].include? pn or pn.empty?
end
bad_paths += %w[/opt/local/bin /opt/local/sbin /sw/bin /sw/sbin]
paths = ENV['PATH'].split(':').reject do |p|
p.squeeze! '/'
bad_paths.find { |pn| p =~ /^
#{
pn
}
/ } and true
end
ENV['PATH'] = paths*':'
end
################################################################ class Cleaner
class Cleaner
def initialize f
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/brewkit.rb
+
0
−
8
View file @
034fc40a
...
...
@@ -175,14 +175,6 @@ end
ENV
.
extend
HomebrewEnvExtension
# remove MacPorts and Fink from the PATH, this prevents issues like:
# http://github.com/mxcl/homebrew/issues/#issue/13
paths
=
ENV
[
'PATH'
].
split
(
':'
).
reject
do
|
p
|
p
.
squeeze!
'/'
p
=~
%r[^/opt/local]
or
p
=~
%r[^/sw]
end
ENV
[
'PATH'
]
=
paths
*
':'
# Clear CDPATH to avoid make issues that depend on changing directories
ENV
.
delete
(
'CDPATH'
)
...
...
This diff is collapsed.
Click to expand it.
bin/brew
+
6
−
0
View file @
034fc40a
...
...
@@ -12,6 +12,12 @@ if %w[/ /usr].include? HOMEBREW_PREFIX.to_s then abort <<-EOS
EOS
end
if
`sw_vers -productVersion`
=~
/10\.(\d)\.(\d+)/
and
$1
.
to_i
<
5
# remove MacPorts and Fink from the PATH, this prevents issues like:
# http://github.com/mxcl/homebrew/issues/#issue/13
# http://github.com/mxcl/homebrew/issues/#issue/48
fix_PATH
onoe
"Homebrew requires Leopard or higher"
abort
"But thanks for your interest anyway!"
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