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
c3255203
Commit
c3255203
authored
11 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Extract version_from_mdls
parent
0b5551ee
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/xquartz.rb
+5
-1
5 additions, 1 deletion
Library/Homebrew/os/mac/xquartz.rb
with
5 additions
and
1 deletion
Library/Homebrew/os/mac/xquartz.rb
+
5
−
1
View file @
c3255203
...
...
@@ -10,7 +10,7 @@ module MacOS::XQuartz extend self
@version
||=
begin
path
=
bundle_path
if
not
path
.
nil?
and
path
.
exist?
`mdls -raw -name kMDItemVersion "
#{
path
}
" 2>/dev/null`
.
strip
version_from_mdls
(
path
)
elsif
prefix
.
to_s
==
"/usr/X11"
guess_system_version
else
...
...
@@ -29,6 +29,10 @@ module MacOS::XQuartz extend self
MacOS
.
app_with_bundle_id
(
FORGE_BUNDLE_ID
)
||
MacOS
.
app_with_bundle_id
(
APPLE_BUNDLE_ID
)
end
def
version_from_mdls
(
path
)
`mdls -raw -name kMDItemVersion "
#{
path
}
" 2>/dev/null`
.
strip
end
# The XQuartz that Apple shipped in OS X through 10.7 does not have a
# pkg-util entry, so if Spotlight indexing is disabled we must make an
# educated guess as to what version is installed.
...
...
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