Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wording and formatting of messages text #6013

Merged
merged 4 commits into from Apr 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Library/Homebrew/brew.sh
Expand Up @@ -100,12 +100,12 @@ then
# Refuse to run on pre-Mavericks
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]]
then
printf "ERROR: Your version of macOS (%s) is too old to run Homebrew!" "$HOMEBREW_MACOS_VERSION" >&2
printf "ERROR: Your version of macOS (%s) is too old to run Homebrew!\\n" "$HOMEBREW_MACOS_VERSION" >&2
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100700" ]]
then
printf " For 10.4 - 10.6 support see: https://github.com/mistydemeo/tigerbrew\n" >&2
printf " For 10.4 - 10.6 support see: https://github.com/mistydemeo/tigerbrew\\n" >&2
fi
printf "\n" >&2
printf "\\n" >&2
fi

# The system Curl is too old for some modern HTTPS certificates on
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/build.rb
Expand Up @@ -125,7 +125,7 @@ def install
end
if ARGV.interactive?
ohai "Entering interactive mode"
puts "Type `exit' to return and finalize the installation"
puts "Type `exit` to return and finalize the installation"
puts "Install to this prefix: #{formula.prefix}"

if ARGV.git?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/abstract_artifact.rb
Expand Up @@ -92,7 +92,7 @@ def self.read_script_arguments(arguments, stanza, default_arguments = {}, overri
unless unknown_keys.empty?
opoo "Unknown arguments to #{description} -- " \
"#{unknown_keys.inspect} (ignored). Running " \
"\"brew update; brew cleanup\" will likely fix it."
"`brew update; brew cleanup` will likely fix it."
end
arguments.select! { |k| permitted_keys.include?(k) }

Expand Down
3 changes: 1 addition & 2 deletions Library/Homebrew/cask/artifact/installer.rb
Expand Up @@ -15,8 +15,7 @@ module ManualInstaller
def install_phase(**)
puts <<~EOS
To complete the installation of Cask #{cask}, you must also
run the installer at

run the installer at:
'#{cask.staged_path.join(path)}'
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/relocated.rb
Expand Up @@ -52,7 +52,7 @@ def summarize

ALT_NAME_ATTRIBUTE = "com.apple.metadata:kMDItemAlternateNames".freeze

# Try to make the asset searchable under the target name. Spotlight
# Try to make the asset searchable under the target name. Spotlight
# respects this attribute for many filetypes, but ignores it for App
# bundles. Alfred 2.2 respects it even for App bundles.
def add_altname_metadata(file, altname, command: nil)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cmd/automerge.rb
Expand Up @@ -65,7 +65,7 @@ def run
return if failed.empty?

$stderr.puts
raise CaskError, "Failed merging the following PRs:\n#{failed.join("\n")}"
raise CaskError, "Failed to merge the following PRs:\n#{failed.join("\n")}"
end

def passed_ci(pr)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cmd/doctor.rb
Expand Up @@ -52,7 +52,7 @@ def check_install_location
puts self.class.none_string
else
locations.map do |l|
add_error "Legacy install at #{l}. Run \"brew uninstall --force brew-cask\"."
add_error "Legacy install at #{l}. Run `brew uninstall --force brew-cask`."
puts l
end
end
Expand Down
30 changes: 11 additions & 19 deletions Library/Homebrew/cask/dsl/caveats.rb
Expand Up @@ -47,21 +47,17 @@ def eval_caveats(&block)
next if MacOS.version < :high_sierra

<<~EOS
To install and/or use #{@cask} you may need to enable their kernel extension in

To install and/or use #{@cask} you may need to enable its kernel extension in:
System Preferences → Security & Privacy → General

For more information refer to vendor documentation or the Apple Technical Note:

For more information refer to vendor documentation or this Apple Technical Note:
#{Formatter.url("https://developer.apple.com/library/content/technotes/tn2459/_index.html")}
EOS
end

caveat :path_environment_variable do |path|
<<~EOS
To use #{@cask}, you may need to add the #{path} directory
to your PATH environment variable, eg (for bash shell):

to your PATH environment variable, e.g. (for bash shell):
export PATH=#{path}:"$PATH"
EOS
end
Expand All @@ -71,7 +67,6 @@ def eval_caveats(&block)
To use #{@cask}, zsh users may need to add the following line to their
~/.zprofile. (Among other effects, #{path} will be added to the
PATH environment variable):

eval `/usr/libexec/path_helper -s`
EOS
end
Expand All @@ -81,28 +76,25 @@ def eval_caveats(&block)

<<~EOS
Cask #{@cask} installs files under /usr/local. The presence of such
files can cause warnings when running "brew doctor", which is considered
files can cause warnings when running `brew doctor`, which is considered
to be a bug in Homebrew Cask.
EOS
end

caveat :depends_on_java do |java_version = :any|
if java_version == :any
<<~EOS
#{@cask} requires Java. You can install the latest version with

#{@cask} requires Java. You can install the latest version with:
brew cask install java
EOS
elsif java_version.include?("11") || java_version.include?("+")
<<~EOS
#{@cask} requires Java #{java_version}. You can install the latest version with

#{@cask} requires Java #{java_version}. You can install the latest version with:
brew cask install java
EOS
else
<<~EOS
#{@cask} requires Java #{java_version}. You can install it with

#{@cask} requires Java #{java_version}. You can install it with:
brew cask install homebrew/cask-versions/java#{java_version}
EOS
end
Expand Down Expand Up @@ -130,15 +122,15 @@ def eval_caveats(&block)

caveat :license do |web_page|
<<~EOS
Installing #{@cask} means you have AGREED to the license at
#{web_page}
Installing #{@cask} means you have AGREED to the license at:
#{Formatter.url(web_page.to_s)}
EOS
end

caveat :free_license do |web_page|
<<~EOS
The vendor offers a free license for #{@cask} at
#{web_page}
The vendor offers a free license for #{@cask} at:
#{Formatter.url(web_page.to_s)}
EOS
end
end
Expand Down
16 changes: 7 additions & 9 deletions Library/Homebrew/cask/exceptions.rb
Expand Up @@ -62,10 +62,10 @@ def to_s
class CaskX11DependencyError < AbstractCaskErrorWithToken
def to_s
<<~EOS
Cask '#{token}' requires XQuartz/X11, which can be installed using Homebrew Cask by running
Cask '#{token}' requires XQuartz/X11, which can be installed using Homebrew Cask by running:
#{Formatter.identifier("brew cask install xquartz")}

or manually, by downloading the package from
or manually, by downloading the package from:
#{Formatter.url("https://www.xquartz.org/")}
EOS
end
Expand Down Expand Up @@ -131,14 +131,12 @@ def initialize(token, expected, actual, path)
def to_s
<<~EOS
Checksum for Cask '#{token}' does not match.

Expected: #{Formatter.success(expected.to_s)}
Actual: #{Formatter.error(actual.to_s)}
File: #{path}

To retry an incomplete download, remove the file above. If the issue persists, visit:

https://github.com/Homebrew/homebrew-cask/blob/master/doc/reporting_bugs/checksum_does_not_match_error.md
Actual: #{Formatter.error(actual.to_s)}
File: #{path}
To retry an incomplete download, remove the file above.
If the issue persists, visit:
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/master/doc/reporting_bugs/checksum_does_not_match_error.md")}
EOS
end
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/installer.rb
Expand Up @@ -438,7 +438,7 @@ def finalize_upgrade
end

def uninstall_artifacts(clear: false)
odebug "Un-installing artifacts"
odebug "Uninstalling artifacts"
artifacts = @cask.artifacts

odebug "#{artifacts.length} artifact/s defined", artifacts
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/cli_parser.rb
Expand Up @@ -272,11 +272,11 @@ class OptionConstraintError < RuntimeError
def initialize(arg1, arg2, missing: false)
if !missing
message = <<~EOS
`#{arg1}` and `#{arg2}` should be passed together
`#{arg1}` and `#{arg2}` should be passed together.
EOS
else
message = <<~EOS
`#{arg2}` cannot be passed without `#{arg1}`
`#{arg2}` cannot be passed without `#{arg1}`.
EOS
end
super message
Expand All @@ -296,7 +296,7 @@ def initialize(args)
class InvalidConstraintError < RuntimeError
def initialize(arg1, arg2)
super <<~EOS
`#{arg1}` and `#{arg2}` cannot be mutually exclusive and mutually dependent simultaneously
`#{arg1}` and `#{arg2}` cannot be mutually exclusive and mutually dependent simultaneously.
EOS
end
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cmd/gist-logs.rb
Expand Up @@ -49,8 +49,8 @@ def gistify_logs(f)
unless f.core_formula?
tap = <<~EOS
Formula: #{f.name}
Tap: #{f.tap}
Path: #{f.path}
Tap: #{f.tap}
Path: #{f.path}
EOS
files["00.tap.out"] = { content: tap }
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cmd/install.rb
Expand Up @@ -231,8 +231,8 @@ def install
# Check if the formula we try to install is the same as installed
# but not migrated one. If --force passed then install anyway.
opoo <<~EOS
#{f.oldname} already installed, it's just not migrated
You can migrate formula with `brew migrate #{f}`
#{f.oldname} is already installed, it's just not migrated
You can migrate this formula with `brew migrate #{f}`
Or you can force install it with `brew install #{f} --force`
EOS
else
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/sh.rb
Expand Up @@ -48,7 +48,7 @@ def sh
gem and pip will ignore our configuration and insist on using the
environment they were built under (mostly). Sadly, scons will also
ignore our configuration.
When done, type `exit'.
When done, type `exit`.
EOS
$stdout.flush
safe_system ENV["SHELL"]
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/update.sh
Expand Up @@ -135,7 +135,7 @@ reset_on_interrupt() {
exit 130
}

# Used for testing purposes, e.g., for testing formula migration after
# Used for testing purposes, e.g. for testing formula migration after
# renaming it in the currently checked-out branch. To test run
# "brew update --simulate-from-current-branch"
simulate_from_current_branch() {
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cmd/vendor-install.sh
Expand Up @@ -152,8 +152,8 @@ EOSCRIPT
odie <<EOS
Checksum mismatch.
Expected: $VENDOR_SHA
Actual: $sha
Archive: $CACHED_LOCATION
Actual: $sha
Archive: $CACHED_LOCATION
To retry an incomplete download, remove the file above.
EOS
fi
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/audit.rb
Expand Up @@ -815,7 +815,7 @@ def audit_text
bin_names.each do |name|
["system", "shell_output", "pipe_output"].each do |cmd|
if text =~ /test do.*#{cmd}[\(\s]+['"]#{Regexp.escape(name)}[\s'"]/m
problem %Q(fully scope test #{cmd} calls e.g. #{cmd} "\#{bin}/#{name}")
problem %Q(fully scope test #{cmd} calls, e.g. #{cmd} "\#{bin}/#{name}")
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/dev-cmd/bump-formula-pr.rb
Expand Up @@ -106,7 +106,7 @@ def bump_formula_pr
if guesses.count == 1
formula = guesses.shift
elsif guesses.count > 1
odie "Couldn't guess formula for sure: could be one of these:\n#{guesses}"
odie "Couldn't guess formula for sure; could be one of these:\n#{guesses}"
end
end
raise FormulaUnspecifiedError unless formula
Expand Down Expand Up @@ -308,8 +308,8 @@ def bump_formula_pr
ohai "git commit --no-edit --verbose --message='#{formula.name} " \
"#{new_formula_version}#{devel_message}' -- #{formula.path}"
ohai "git push --set-upstream $HUB_REMOTE #{branch}:#{branch}"
ohai "create pull request with GitHub API"
ohai "git checkout --quiet -"
ohai "create pull request with GitHub API"
else

begin
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/dev-cmd/edit.rb
Expand Up @@ -24,8 +24,8 @@ def edit
unless (HOMEBREW_REPOSITORY/".git").directory?
raise <<~EOS
Changes will be lost!
The first time you `brew update', all local changes will be lost; you should
thus `brew update' before you `brew edit'!
The first time you `brew update`, all local changes will be lost; you should
thus `brew update` before you `brew edit`!
EOS
end

Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/dev-cmd/pull.rb
Expand Up @@ -147,7 +147,7 @@ def pull
if patch_changes[:formulae].length > 1
odie "Can only bump one changed formula; bumped #{patch_changes[:formulae]}"
end
odie "Can not bump if non-formula files are changed" unless patch_changes[:others].empty?
odie "Cannot bump if non-formula files are changed" unless patch_changes[:others].empty?
end
old_versions = current_versions_from_info_external(patch_changes[:formulae].first) if is_bumpable
patch_puller.apply_patch
Expand Down Expand Up @@ -208,7 +208,7 @@ def pull
end

if changed_formulae_names.empty?
odie "cannot bump: no changed formulae found after applying patch" if do_bump
odie "Cannot bump: no changed formulae found after applying patch" if do_bump
is_bumpable = false
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/tests.rb
Expand Up @@ -55,7 +55,7 @@ def tests

ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp

# Avoid local configuration messing with tests e.g. git being configured
# Avoid local configuration messing with tests, e.g. git being configured
# to use GPG to sign by default
ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test"

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/update-test.rb
Expand Up @@ -70,7 +70,7 @@ def update_test
end

puts "Start commit: #{start_commit}"
puts "End commit: #{end_commit}"
puts " End commit: #{end_commit}"

mkdir "update-test"
chdir "update-test" do
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/development_tools.rb
Expand Up @@ -20,7 +20,7 @@ def installed?
end

def installation_instructions
"Install Clang or brew install gcc"
"Install Clang or run `brew install gcc`."
end
alias custom_installation_instructions installation_instructions

Expand Down