Skip to content

Commit 2acd4e4

Browse files
authored
Improve messaging with missing xattr
1 parent 12e5e24 commit 2acd4e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Library/Homebrew/diagnostic.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,8 @@ def check_cask_environment_variables
10091009
end
10101010

10111011
def check_cask_xattr
1012+
return "Unable to find `xattr`." unless File.exist?("/usr/bin/xattr")
1013+
10121014
result = system_command "/usr/bin/xattr", args: ["-h"]
10131015

10141016
return if result.status.success?
@@ -1031,8 +1033,6 @@ def check_cask_xattr
10311033
end
10321034
elsif result.stderr.include? "pkg_resources.DistributionNotFound"
10331035
"Your Python installation is unable to find `xattr`."
1034-
elsif result.stderr.include? "No such file or directory"
1035-
"Unable to find `xattr`."
10361036
else
10371037
"unknown xattr error: #{result.stderr.split("\n").last}"
10381038
end

0 commit comments

Comments
 (0)