mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Improve messaging with missing xattr
This commit is contained in:
parent
12e5e24ce3
commit
2acd4e4293
@ -1009,6 +1009,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_cask_xattr
|
def check_cask_xattr
|
||||||
|
return "Unable to find `xattr`." unless File.exist?("/usr/bin/xattr")
|
||||||
|
|
||||||
result = system_command "/usr/bin/xattr", args: ["-h"]
|
result = system_command "/usr/bin/xattr", args: ["-h"]
|
||||||
|
|
||||||
return if result.status.success?
|
return if result.status.success?
|
||||||
@ -1031,8 +1033,6 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
elsif result.stderr.include? "pkg_resources.DistributionNotFound"
|
elsif result.stderr.include? "pkg_resources.DistributionNotFound"
|
||||||
"Your Python installation is unable to find `xattr`."
|
"Your Python installation is unable to find `xattr`."
|
||||||
elsif result.stderr.include? "No such file or directory"
|
|
||||||
"Unable to find `xattr`."
|
|
||||||
else
|
else
|
||||||
"unknown xattr error: #{result.stderr.split("\n").last}"
|
"unknown xattr error: #{result.stderr.split("\n").last}"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user