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
c7f2ecc5
Unverified
Commit
c7f2ecc5
authored
5 years ago
by
Markus Reiter
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #6515 from amyspark/add-xattr-check
Cask: add doctor check for xattr
parents
153cd2cd
eccdc4c2
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/cask/cmd/doctor.rb
+24
-0
24 additions, 0 deletions
Library/Homebrew/cask/cmd/doctor.rb
with
24 additions
and
0 deletions
Library/Homebrew/cask/cmd/doctor.rb
+
24
−
0
View file @
c7f2ecc5
...
...
@@ -25,6 +25,7 @@ module Cask
def
run
check_software_versions
check_xattr
check_quarantine_support
check_install_location
check_staging_location
...
...
@@ -121,6 +122,29 @@ module Cask
(
locale_variables
+
environment_variables
).
sort
.
each
(
&
method
(
:render_env_var
))
end
def
check_xattr
ohai
"xattr issues"
result
=
system_command
"/usr/bin/xattr"
if
result
.
status
.
success?
puts
none_string
elsif
result
.
stderr
.
include?
"ImportError: No module named pkg_resources"
result
=
system_command
"/usr/bin/python"
,
"--version"
if
result
.
stdout
.
include?
"Python 2.7"
add_error
"Your Python installation has a broken version of setuptools."
add_error
"To fix, reinstall macOS or run 'sudo /usr/bin/python -m pip install -I setuptools'."
else
add_error
"The system Python version is wrong."
add_error
"To fix, run 'defaults write com.apple.versioner.python Version 2.7'."
end
elsif
result
.
stderr
.
include?
"pkg_resources.DistributionNotFound"
add_error
"Your Python installation is unable to find xattr."
else
add_error
"unknown xattr error:
#{
result
.
stderr
.
first
}
"
end
end
def
check_quarantine_support
ohai
"Gatekeeper support"
...
...
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