Skip to content

Commit 564fa88

Browse files
authored
Merge pull request Homebrew#1213 from MikeMcQuaid/diagnostic-messages
*/diagnostic: tweak messaging.
2 parents f7d1f4e + 8a57fee commit 564fa88

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

Library/Homebrew/diagnostic.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,10 @@ def check_homebrew_prefix
389389
return if HOMEBREW_PREFIX.to_s == "/usr/local"
390390

391391
<<-EOS.undent
392-
Your Homebrew is not installed to /usr/local
393-
You can install Homebrew anywhere you want but some bottles (binary
394-
packages) can only be used in /usr/local and some formulae (packages)
395-
may not build correctly unless you install in /usr/local. Sorry!
392+
Your Homebrew's prefix is not /usr/local.
393+
You can install Homebrew anywhere you want but some bottles (binary packages)
394+
can only be used with a /usr/local prefix and some formulae (packages)
395+
may not build correctly with a non-/usr/local prefix.
396396
EOS
397397
end
398398

Library/Homebrew/extend/os/mac/diagnostic.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ def check_xcode_up_to_date
6565
return unless MacOS::Xcode.installed? && MacOS::Xcode.outdated?
6666

6767
message = <<-EOS.undent
68-
Your Xcode (#{MacOS::Xcode.version}) is outdated
69-
Please update to Xcode #{MacOS::Xcode.latest_version}.
68+
Your Xcode (#{MacOS::Xcode.version}) is outdated.
69+
Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it).
7070
#{MacOS::Xcode.update_instructions}
7171
EOS
7272

@@ -171,8 +171,7 @@ def check_for_other_package_managers
171171
end
172172

173173
def check_ruby_version
174-
ruby_version = MacOS.version >= "10.9" ? "2.0" : "1.8"
175-
return if RUBY_VERSION[/\d\.\d/] == ruby_version
174+
return if RUBY_VERSION[/\d\.\d/] == "2.0"
176175

177176
<<-EOS.undent
178177
Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew
@@ -264,8 +263,8 @@ def check_for_latest_xquartz
264263
return if installed_version >= latest_version
265264

266265
<<-EOS.undent
267-
Your XQuartz (#{installed_version}) is outdated
268-
Please install XQuartz #{latest_version}:
266+
Your XQuartz (#{installed_version}) is outdated.
267+
Please install XQuartz #{latest_version} (or delete it):
269268
https://xquartz.macosforge.org
270269
EOS
271270
end

Library/Homebrew/test/test_diagnostic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_check_access_cellar
8585

8686
def test_check_homebrew_prefix
8787
# the integration tests are run in a special prefix
88-
assert_match "Your Homebrew is not installed to /usr/local",
88+
assert_match "Your Homebrew's prefix is not /usr/local.",
8989
@checks.check_homebrew_prefix
9090
end
9191

0 commit comments

Comments
 (0)