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
5994fd46
Commit
5994fd46
authored
11 years ago
by
Misty De Meo
Browse files
Options
Downloads
Patches
Plain Diff
xcode-select check: move after first options
parent
85626643
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/brew.rb
+16
-16
16 additions, 16 deletions
Library/brew.rb
with
16 additions
and
16 deletions
Library/brew.rb
+
16
−
16
View file @
5994fd46
...
...
@@ -16,22 +16,6 @@ $:.unshift(HOMEBREW_LIBRARY_PATH + '/vendor')
$:
.
unshift
(
HOMEBREW_LIBRARY_PATH
)
require
'global'
# Check for bad xcode-select before anything else, because `doctor` and
# many other things will hang
# Note that this bug was fixed in 10.9
if
`xcode-select -print-path 2>/dev/null`
.
chomp
==
'/'
&&
MacOS
.
version
<
:mavericks
ofail
<<-
EOS
.
undent
Your xcode-select path is currently set to '/'.
This causes the `xcrun` tool to hang, and can render Homebrew unusable.
If you are using Xcode, you should:
sudo xcode-select -switch /Applications/Xcode.app
Otherwise, you should:
sudo rm -rf /usr/share/xcode-select
EOS
exit
1
end
case
ARGV
.
first
when
'-h'
,
'--help'
,
'--usage'
,
'-?'
,
'help'
,
nil
require
'cmd/help'
puts
Homebrew
.
help_s
...
...
@@ -47,6 +31,22 @@ when '-v'
exit
0
if
ARGV
.
length
==
1
end
# Check for bad xcode-select before anything else, because `doctor` and
# many other things will hang
# Note that this bug was fixed in 10.9
if
OS
.
mac?
&&
`xcode-select -print-path 2>/dev/null`
.
chomp
==
'/'
&&
MacOS
.
version
<
:mavericks
ofail
<<-
EOS
.
undent
Your xcode-select path is currently set to '/'.
This causes the `xcrun` tool to hang, and can render Homebrew unusable.
If you are using Xcode, you should:
sudo xcode-select -switch /Applications/Xcode.app
Otherwise, you should:
sudo rm -rf /usr/share/xcode-select
EOS
exit
1
end
case
HOMEBREW_PREFIX
.
to_s
when
'/'
,
'/usr'
# it may work, but I only see pain this route and don't want to support it
abort
"Cowardly refusing to continue at this prefix:
#{
HOMEBREW_PREFIX
}
"
...
...
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