Skip to content

Commit

Permalink
fixes for grammar and wording
Browse files Browse the repository at this point in the history
  • Loading branch information
EricFromCanada committed Jan 26, 2021
1 parent 99ad335 commit 6fc1163
Show file tree
Hide file tree
Showing 52 changed files with 160 additions and 159 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/build.rb
Expand Up @@ -152,7 +152,7 @@ def install
system "git", "add", "-A"
end
if args.interactive?
ohai "Entering interactive mode"
ohai "Entering interactive mode..."
puts <<~EOS
Type `exit` to return and finalize the installation.
Install to this prefix: #{formula.prefix}
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/artifact/abstract_uninstall.rb
Expand Up @@ -303,7 +303,7 @@ def uninstall_script(directives, directive_name: :script, force: false, command:
message = "uninstall script #{executable} does not exist"
raise CaskError, "#{message}." unless force

opoo "#{message}, skipping."
opoo "#{message}; skipping."
return
end

Expand Down Expand Up @@ -398,7 +398,7 @@ def trash_paths(*paths, command: nil, **_)
false
end

opoo "The following files could not trashed, please do so manually:"
opoo "The following files could not be trashed, please do so manually:"
$stderr.puts untrashable

[trashed, untrashable]
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/cask/artifact/moved.rb
Expand Up @@ -48,7 +48,7 @@ def move(force: false, command: nil, **options)
raise CaskError, "It seems the #{self.class.english_name} source '#{source}' is not there."
end

ohai "Moving #{self.class.english_name} '#{source.basename}' to '#{target}'."
ohai "Moving #{self.class.english_name} '#{source.basename}' to '#{target}'"
if target.dirname.ascend.find(&:directory?).writable?
target.dirname.mkpath
else
Expand Down Expand Up @@ -84,7 +84,7 @@ def move_back(skip: false, force: false, command: nil, **options)
raise CaskError, "It seems the #{self.class.english_name} source '#{target}' is not there."
end

ohai "Backing #{self.class.english_name} '#{target.basename}' up to '#{source}'."
ohai "Backing #{self.class.english_name} '#{target.basename}' up to '#{source}'"
source.dirname.mkpath

# We need to preserve extended attributes between copies.
Expand All @@ -94,7 +94,7 @@ def move_back(skip: false, force: false, command: nil, **options)
end

def delete(target, force: false, command: nil, **_)
ohai "Removing #{self.class.english_name} '#{target}'."
ohai "Removing #{self.class.english_name} '#{target}'"
raise CaskError, "Cannot remove undeletable #{self.class.english_name}." if MacOS.undeletable?(target)

return unless Utils.path_occupied?(target)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/artifact/relocated.rb
Expand Up @@ -82,7 +82,7 @@ def add_altname_metadata(file, altname, command: nil)
altnames = command.run("/usr/bin/xattr",
args: ["-p", ALT_NAME_ATTRIBUTE, file],
print_stderr: false).stdout.sub(/\A\((.*)\)\Z/, '\1')
odebug "Existing metadata is: '#{altnames}'"
odebug "Existing metadata is: #{altnames}"
altnames.concat(", ") unless altnames.empty?
altnames.concat(%Q("#{altname}"))
altnames = "(#{altnames})"
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/artifact/symlinked.rb
Expand Up @@ -65,14 +65,14 @@ def link(force: false, **options)
end
end

ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'."
ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'"
create_filesystem_link(**options)
end

def unlink(**)
return unless target.symlink?

ohai "Unlinking #{self.class.english_name} '#{target}'."
ohai "Unlinking #{self.class.english_name} '#{target}'"
target.delete
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cask_loader.rb
Expand Up @@ -115,7 +115,7 @@ def load(config:)
path.dirname.mkpath

begin
ohai "Downloading #{url}."
ohai "Downloading #{url}"
curl_download url, to: path
rescue ErrorDuringExecution
raise CaskUnavailableError.new(token, "Failed to download #{Formatter.url(url)}.")
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cmd/abstract_command.rb
Expand Up @@ -129,7 +129,7 @@ def suggestion_message(cask_token)
matches = search_casks(cask_token)

if matches.one?
"Did you mean #{matches.first}?"
"Did you mean '#{matches.first}'?"
elsif !matches.empty?
"Did you mean one of these?\n#{Formatter.columns(matches.take(20))}"
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cmd/internal_stanza.rb
Expand Up @@ -80,7 +80,7 @@ def initialize(*)
return if DSL::DSL_METHODS.include?(stanza)

raise UsageError, <<~EOS
Unknown/unsupported stanza: '#{stanza}'
Unknown/unsupported stanza '#{stanza}'.
Check cask reference for supported stanzas.
EOS
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/download.rb
Expand Up @@ -63,7 +63,7 @@ def verify_download_integrity(fn)
end

begin
ohai "Verifying checksum for cask '#{@cask}'." if verbose?
ohai "Verifying checksum for cask '#{@cask}'" if verbose?
fn.verify_checksum(@cask.sha256)
rescue ChecksumMissingError
opoo <<~EOS
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/dsl.rb
Expand Up @@ -201,7 +201,7 @@ def container(*args)
def version(arg = nil)
set_unique_stanza(:version, arg.nil?) do
if !arg.is_a?(String) && arg != :latest
raise CaskInvalidError.new(cask, "invalid 'version' value: '#{arg.inspect}'")
raise CaskInvalidError.new(cask, "invalid 'version' value: #{arg.inspect}")
end

DSL::Version.new(arg)
Expand All @@ -216,7 +216,7 @@ def sha256(arg = nil)
when String
Checksum.new(arg)
else
raise CaskInvalidError.new(cask, "invalid 'sha256' value: '#{arg.inspect}'")
raise CaskInvalidError.new(cask, "invalid 'sha256' value: #{arg.inspect}")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/caveats.rb
Expand Up @@ -92,7 +92,7 @@ def eval_caveats(&block)
caveat :zsh_path_helper do |path|
<<~EOS
To use #{@cask}, zsh users may need to add the following line to their
~/.zprofile. (Among other effects, #{path} will be added to the
~/.zprofile. (Among other effects, #{path} will be added to the
PATH environment variable):
eval `/usr/libexec/path_helper -s`
EOS
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/container.rb
Expand Up @@ -19,7 +19,7 @@ class Container
def initialize(pairs = {})
@pairs = pairs
pairs.each do |key, value|
raise "invalid container key: '#{key.inspect}'" unless VALID_KEYS.include?(key)
raise "invalid container key: #{key.inspect}" unless VALID_KEYS.include?(key)

send(:"#{key}=", value)
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/dsl/depends_on.rb
Expand Up @@ -52,7 +52,7 @@ def cask=(*args)
end

def macos=(*args)
raise "Only a single 'depends_on macos:' is allowed." if defined?(@macos)
raise "Only a single 'depends_on macos' is allowed." if defined?(@macos)

begin
@macos = if args.count > 1
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/installer.rb
Expand Up @@ -280,7 +280,7 @@ def arch_dependencies
raise CaskError,
"Cask #{@cask} depends on hardware architecture being one of " \
"[#{@cask.depends_on.arch.map(&:to_s).join(", ")}], " \
"but you are running #{@current_arch}"
"but you are running #{@current_arch}."
end

def x11_dependencies
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/metadata.rb
Expand Up @@ -32,7 +32,7 @@ def metadata_timestamped_path(version: self.version, timestamp: :latest, create:
end

if create && !path.directory?
odebug "Creating metadata directory #{path}."
odebug "Creating metadata directory: #{path}"
path.mkpath
end

Expand All @@ -50,7 +50,7 @@ def metadata_subdir(leaf, version: self.version, timestamp: :latest, create: fal
subdir = parent.join(leaf)

if create && !subdir.directory?
odebug "Creating metadata subdirectory #{subdir}."
odebug "Creating metadata subdirectory: #{subdir}"
subdir.mkpath
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/staged.rb
Expand Up @@ -29,7 +29,7 @@ def set_ownership(paths, user: T.must(User.current), group: "staff")
full_paths = remove_nonexistent(paths)
return if full_paths.empty?

ohai "Changing ownership of paths required by #{@cask}; your password may be necessary"
ohai "Changing ownership of paths required by #{@cask}; your password may be necessary."
@command.run!("/usr/sbin/chown", args: ["-R", "--", "#{user}:#{group}", *full_paths],
sudo: true)
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/caveats.rb
Expand Up @@ -62,7 +62,7 @@ def keg_only_text(skip_reason: false)
if f.bin.directory? || f.sbin.directory?
s << <<~EOS
If you need to have #{f.name} first in your PATH run:
If you need to have #{f.name} first in your PATH, run:
EOS
s << " #{Utils::Shell.prepend_path_in_profile(f.opt_bin.to_s)}\n" if f.bin.directory?
s << " #{Utils::Shell.prepend_path_in_profile(f.opt_sbin.to_s)}\n" if f.sbin.directory?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/fetch.rb
Expand Up @@ -96,7 +96,7 @@ def fetch

fetched_bottle = false
onoe e.message
opoo "Bottle fetch failed: fetching the source."
opoo "Bottle fetch failed, fetching the source instead."
else
fetched_bottle = true
end
Expand Down
24 changes: 13 additions & 11 deletions Library/Homebrew/cmd/install.rb
Expand Up @@ -184,7 +184,7 @@ def install
# head-only without --HEAD is an error
if !args.HEAD? && f.stable.nil?
odie <<~EOS
#{f.full_name} is a head-only formula
#{f.full_name} is a head-only formula.
To install it, run:
brew install --HEAD #{f.full_name}
EOS
Expand All @@ -208,15 +208,15 @@ def install
if f.outdated?
optlinked_version = Keg.for(f.opt_prefix).version
onoe <<~EOS
#{f.full_name} #{optlinked_version} is already installed
#{f.full_name} #{optlinked_version} is already installed.
To upgrade to #{f.version}, run:
brew upgrade #{f.full_name}
EOS
elsif args.only_dependencies?
installed_formulae << f
elsif !args.quiet?
opoo <<~EOS
#{f.full_name} #{f.pkg_version} is already installed and up-to-date
#{f.full_name} #{f.pkg_version} is already installed and up-to-date.
To reinstall #{f.pkg_version}, run:
brew reinstall #{f.name}
EOS
Expand All @@ -239,13 +239,13 @@ def install
nil
else
<<~EOS
#{msg}
The currently linked version is #{f.linked_version}
#{msg}.
The currently linked version is: #{f.linked_version}
EOS
end
elsif !f.linked? || f.keg_only?
msg = <<~EOS
#{msg}, it's just not linked
#{msg}, it's just not linked.
To link this version, run:
brew link #{f}
EOS
Expand All @@ -257,7 +257,7 @@ def install
nil
else
<<~EOS
#{msg} and up-to-date
#{msg} and up-to-date.
To reinstall #{f.pkg_version}, run:
brew reinstall #{f.name}
EOS
Expand All @@ -266,21 +266,23 @@ def install
opoo msg if msg
elsif !f.any_version_installed? && old_formula = f.old_installed_formulae.first
msg = "#{old_formula.full_name} #{old_formula.any_installed_version} already installed"
if !old_formula.linked? && !old_formula.keg_only?
msg = <<~EOS
msg = if !old_formula.linked? && !old_formula.keg_only?
<<~EOS
#{msg}, it's just not linked.
To link this version, run:
brew link #{old_formula.full_name}
EOS
elsif args.quiet?
msg = nil
nil
else
"#{msg}."
end
opoo msg if msg
elsif f.migration_needed? && !args.force?
# Check if the formula we try to install is the same as installed
# but not migrated one. If --force is passed then install anyway.
opoo <<~EOS
#{f.oldname} is already installed, it's just not migrated
#{f.oldname} is already installed, it's just not migrated.
To migrate this formula, run:
brew migrate #{f}
Or to force-install it, run:
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/link.rb
Expand Up @@ -104,7 +104,7 @@ def link
puts
raise
else
puts "#{n} symlinks created"
puts "#{n} symlinks created."
end

puts_keg_only_path_message(keg) if keg_only && !Homebrew::EnvConfig.developer?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/log.rb
Expand Up @@ -65,7 +65,7 @@ def git_log(cd_dir, path = nil, tap = nil, args:)
if File.exist? "#{repo}/.git/shallow"
opoo <<~EOS
#{name} is a shallow clone so only partial output will be shown.
To get a full clone run:
To get a full clone, run:
git -C "#{git_cd}" fetch --unshallow
EOS
end
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/cmd/update-report.rb
Expand Up @@ -54,7 +54,7 @@ def update_report
puts <<~EOS
#{Tty.bold}Read the analytics documentation (and how to opt-out) here:
#{Formatter.url("https://docs.brew.sh/Analytics")}#{Tty.reset}
No analytics have been recorded yet (or will be during this `brew` run).
No analytics have been recorded yet (nor will be during this `brew` run).
EOS

Expand Down Expand Up @@ -343,7 +343,7 @@ def migrate_tap_migration
new_tap = Tap.fetch(new_tap_name)
new_tap.install unless new_tap.installed?
ohai "#{name} has been moved to Homebrew.", <<~EOS
To uninstall the cask run:
To uninstall the cask, run:
brew uninstall --cask --force #{name}
EOS
next if (HOMEBREW_CELLAR/new_name.split("/").last).directory?
Expand Down Expand Up @@ -384,7 +384,7 @@ def migrate_tap_migration
EOS
else
ohai "#{name} has been moved to Homebrew Cask.", <<~EOS
To uninstall the formula and install the cask run:
To uninstall the formula and install the cask, run:
brew uninstall --force #{name}
brew tap #{new_tap_name}
brew install --cask #{new_name}
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/cmd/update.sh
Expand Up @@ -114,8 +114,8 @@ pop_stash() {

pop_stash_message() {
[[ -z "$STASHED" ]] && return
echo "To restore the stashed changes to $DIR run:"
echo " 'cd $DIR && git stash pop'"
echo "To restore the stashed changes to $DIR, run:"
echo " cd $DIR && git stash pop"
unset STASHED
}

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/vendor-install.sh
Expand Up @@ -133,7 +133,7 @@ fetch() {
odie <<EOS
Failed to download $VENDOR_URL and $VENDOR_URL2!
Do not file an issue on GitHub about this: you will need to figure out for
Do not file an issue on GitHub about this; you will need to figure out for
yourself what issue with your internet connection restricts your access to
both Bintray (used for Homebrew bottles/binary packages) and GitHub
(used for Homebrew updates).
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/config.rb
Expand Up @@ -56,7 +56,7 @@ def self.[](env)
# Where downloads (bottles, source tarballs, etc.) are cached
HOMEBREW_CACHE = Pathname(EnvVar["HOMEBREW_CACHE"]).freeze

# Where brews installed via URL are cached
# Where formulae installed via URL are cached
HOMEBREW_CACHE_FORMULA = (HOMEBREW_CACHE/"Formula").freeze

# Where build, postinstall, and test logs of formulae are written to
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bump-formula-pr.rb
Expand Up @@ -110,7 +110,7 @@ def use_correct_linux_tap(formula, args:)
ohai "Fetching remote #{homebrew_core_remote}"
safe_system "git", "fetch", homebrew_core_remote, "HEAD", default_origin_branch
if quiet_system "git", "cat-file", "-e", "#{full_origin_branch}:#{formula_path}"
ohai "#{formula.full_name} exists in #{full_origin_branch}"
ohai "#{formula.full_name} exists in #{full_origin_branch}."
safe_system "git", "checkout", full_origin_branch
return tap_full_name, homebrew_core_remote, default_origin_branch, previous_branch
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/edit.rb
Expand Up @@ -48,7 +48,7 @@ def edit
"to create a new formula!"
end.presence

# If no brews are listed, open the project root in an editor.
# If no formulae are listed, open the project root in an editor.
paths ||= [HOMEBREW_REPOSITORY]

exec_editor(*paths)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/man.rb
Expand Up @@ -22,7 +22,7 @@ def man_args
description <<~EOS
Generate Homebrew's manpages.
Not (yet) working on Apple Silicon.
*Note:* Not (yet) working on Apple Silicon.
EOS
switch "--fail-if-changed",
description: "Return a failing status code if changes are detected in the manpage outputs. This "\
Expand Down

0 comments on commit 6fc1163

Please sign in to comment.