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
f6d5d812
Commit
f6d5d812
authored
10 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Simpler Xcode prefix detection code
parent
2c6d4973
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/os/mac/xcode.rb
+11
-10
11 additions, 10 deletions
Library/Homebrew/os/mac/xcode.rb
with
11 additions
and
10 deletions
Library/Homebrew/os/mac/xcode.rb
+
11
−
10
View file @
f6d5d812
...
...
@@ -33,16 +33,17 @@ module OS
end
def
prefix
@prefix
||=
begin
path
=
Pathname
.
new
(
MacOS
.
active_developer_dir
)
if
path
!=
CLT
::
MAVERICKS_PKG_PATH
and
path
.
absolute?
\
and
File
.
executable?
"
#{
path
}
/usr/bin/make"
path
elsif
(
path
=
bundle_path
)
path
+=
"Contents/Developer"
path
if
File
.
executable?
"
#{
path
}
/usr/bin/make"
@prefix
||=
begin
dir
=
MacOS
.
active_developer_dir
if
dir
.
empty?
||
dir
==
CLT
::
MAVERICKS_PKG_PATH
||
!
File
.
directory?
(
dir
)
path
=
bundle_path
path
.
join
(
"Contents"
,
"Developer"
)
if
path
else
Pathname
.
new
(
dir
)
end
end
end
end
def
toolchain_path
...
...
@@ -146,7 +147,7 @@ module OS
STANDALONE_PKG_ID
=
"com.apple.pkg.DeveloperToolsCLILeo"
FROM_XCODE_PKG_ID
=
"com.apple.pkg.DeveloperToolsCLI"
MAVERICKS_PKG_ID
=
"com.apple.pkg.CLTools_Executables"
MAVERICKS_PKG_PATH
=
Pathname
.
new
(
"/Library/Developer/CommandLineTools"
)
MAVERICKS_PKG_PATH
=
"/Library/Developer/CommandLineTools"
# Returns true even if outdated tools are installed, e.g.
# tools from Xcode 4.x on 10.9
...
...
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