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
2c6915a4
Commit
2c6915a4
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
xcode: general cleanup.
parent
4a39070c
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
+7
-7
7 additions, 7 deletions
Library/Homebrew/os/mac/xcode.rb
with
7 additions
and
7 deletions
Library/Homebrew/os/mac/xcode.rb
+
7
−
7
View file @
2c6915a4
...
...
@@ -3,8 +3,8 @@ module OS
module
Xcode
module_function
V4_
BUNDLE_ID
=
"com.apple.dt.Xcode"
.
freeze
V3
_BUNDLE_ID
=
"com.apple.Xcode"
.
freeze
BUNDLE_ID
=
"com.apple.dt.Xcode"
.
freeze
OLD
_BUNDLE_ID
=
"com.apple.Xcode"
.
freeze
def
latest_version
case
MacOS
.
version
...
...
@@ -51,9 +51,9 @@ module OS
begin
dir
=
MacOS
.
active_developer_dir
if
dir
.
empty?
||
dir
==
CLT
::
MAVERICKS_
PKG_PATH
||
!
File
.
directory?
(
dir
)
if
dir
.
empty?
||
dir
==
CLT
::
PKG_PATH
||
!
File
.
directory?
(
dir
)
path
=
bundle_path
path
.
join
(
"Contents
"
,
"
Developer"
)
if
path
path
/
"Contents
/
Developer"
if
path
else
# Use cleanpath to avoid pathological trailing slash
Pathname
.
new
(
dir
).
cleanpath
...
...
@@ -182,7 +182,7 @@ module OS
FROM_XCODE_PKG_ID
=
"com.apple.pkg.DeveloperToolsCLI"
.
freeze
MAVERICKS_PKG_ID
=
"com.apple.pkg.CLTools_Executables"
.
freeze
MAVERICKS_NEW_PKG_ID
=
"com.apple.pkg.CLTools_Base"
.
freeze
# obsolete
MAVERICKS_
PKG_PATH
=
"/Library/Developer/CommandLineTools"
.
freeze
PKG_PATH
=
"/Library/Developer/CommandLineTools"
.
freeze
# Returns true even if outdated tools are installed, e.g.
# tools from Xcode 4.x on 10.9
...
...
@@ -237,7 +237,7 @@ module OS
return
false
if
MacOS
.
version
<
:lion
if
MacOS
.
version
>=
:mavericks
version
=
Utils
.
popen_read
(
"
#{
MAVERICKS_
PKG_PATH
}
/usr/bin/clang --version"
)
version
=
Utils
.
popen_read
(
"
#{
PKG_PATH
}
/usr/bin/clang --version"
)
else
version
=
Utils
.
popen_read
(
"/usr/bin/clang --version"
)
end
...
...
@@ -261,7 +261,7 @@ module OS
[
MAVERICKS_PKG_ID
,
MAVERICKS_NEW_PKG_ID
,
STANDALONE_PKG_ID
,
FROM_XCODE_PKG_ID
].
find
do
|
id
|
if
MacOS
.
version
>=
:mavericks
next
unless
File
.
exist?
(
"
#{
MAVERICKS_
PKG_PATH
}
/usr/bin/clang"
)
next
unless
File
.
exist?
(
"
#{
PKG_PATH
}
/usr/bin/clang"
)
end
version
=
MacOS
.
pkgutil_info
(
id
)[
/version: (.+)$/
,
1
]
return
version
if
version
...
...
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