From 6fc116318e53cc8dae1460a0896026399a75e383 Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Tue, 26 Jan 2021 15:21:24 -0500 Subject: [PATCH] fixes for grammar and wording --- Library/Homebrew/build.rb | 2 +- .../cask/artifact/abstract_uninstall.rb | 4 +- Library/Homebrew/cask/artifact/moved.rb | 6 +-- Library/Homebrew/cask/artifact/relocated.rb | 2 +- Library/Homebrew/cask/artifact/symlinked.rb | 4 +- Library/Homebrew/cask/cask_loader.rb | 2 +- Library/Homebrew/cask/cmd/abstract_command.rb | 2 +- Library/Homebrew/cask/cmd/internal_stanza.rb | 2 +- Library/Homebrew/cask/download.rb | 2 +- Library/Homebrew/cask/dsl.rb | 4 +- Library/Homebrew/cask/dsl/caveats.rb | 2 +- Library/Homebrew/cask/dsl/container.rb | 2 +- Library/Homebrew/cask/dsl/depends_on.rb | 2 +- Library/Homebrew/cask/installer.rb | 2 +- Library/Homebrew/cask/metadata.rb | 4 +- Library/Homebrew/cask/staged.rb | 2 +- Library/Homebrew/caveats.rb | 2 +- Library/Homebrew/cmd/fetch.rb | 2 +- Library/Homebrew/cmd/install.rb | 24 ++++++----- Library/Homebrew/cmd/link.rb | 2 +- Library/Homebrew/cmd/log.rb | 2 +- Library/Homebrew/cmd/update-report.rb | 6 +-- Library/Homebrew/cmd/update.sh | 4 +- Library/Homebrew/cmd/vendor-install.sh | 2 +- Library/Homebrew/config.rb | 2 +- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 2 +- Library/Homebrew/dev-cmd/edit.rb | 2 +- Library/Homebrew/dev-cmd/man.rb | 2 +- Library/Homebrew/dev-cmd/unbottled.rb | 11 ++--- Library/Homebrew/diagnostic.rb | 24 +++++------ Library/Homebrew/env_config.rb | 4 +- Library/Homebrew/extend/ENV/shared.rb | 4 +- Library/Homebrew/formula_cellar_checks.rb | 42 +++++++++---------- Library/Homebrew/formula_installer.rb | 6 +-- Library/Homebrew/keg.rb | 2 +- Library/Homebrew/manpages/brew.1.md.erb | 2 +- Library/Homebrew/missing_formula.rb | 6 +-- Library/Homebrew/os/mac/xcode.rb | 2 +- Library/Homebrew/resource.rb | 2 +- Library/Homebrew/shims/linux/super/make | 2 +- Library/Homebrew/system_command.rb | 2 +- .../Homebrew/test/cask/artifact/app_spec.rb | 12 +++--- .../Homebrew/test/cask/cmd/install_spec.rb | 4 +- .../Homebrew/test/cask/cmd/reinstall_spec.rb | 6 +-- .../Homebrew/test/cask/cmd/uninstall_spec.rb | 4 +- .../Homebrew/test/diagnostic_checks_spec.rb | 4 +- Library/Homebrew/test/tap_spec.rb | 2 +- Library/Homebrew/unlink.rb | 2 +- Library/Homebrew/utils/ruby.sh | 2 +- completions/zsh/_brew | 10 ++--- docs/Manpage.md | 30 ++++++------- manpages/brew.1 | 38 ++++++++--------- 52 files changed, 160 insertions(+), 159 deletions(-) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index 6e0c581902645..03814cc855306 100644 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -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} diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 7705f9f65d3cc..3daf5e2abfe80 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -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 @@ -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] diff --git a/Library/Homebrew/cask/artifact/moved.rb b/Library/Homebrew/cask/artifact/moved.rb index bd9287ad29e89..6ad4cf61ccd41 100644 --- a/Library/Homebrew/cask/artifact/moved.rb +++ b/Library/Homebrew/cask/artifact/moved.rb @@ -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 @@ -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. @@ -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) diff --git a/Library/Homebrew/cask/artifact/relocated.rb b/Library/Homebrew/cask/artifact/relocated.rb index 316da5d69a89f..17f2eceff45eb 100644 --- a/Library/Homebrew/cask/artifact/relocated.rb +++ b/Library/Homebrew/cask/artifact/relocated.rb @@ -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})" diff --git a/Library/Homebrew/cask/artifact/symlinked.rb b/Library/Homebrew/cask/artifact/symlinked.rb index bb423e69d40f8..653caeed91494 100644 --- a/Library/Homebrew/cask/artifact/symlinked.rb +++ b/Library/Homebrew/cask/artifact/symlinked.rb @@ -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 diff --git a/Library/Homebrew/cask/cask_loader.rb b/Library/Homebrew/cask/cask_loader.rb index b49ad9275e0eb..d6dab183ca43d 100644 --- a/Library/Homebrew/cask/cask_loader.rb +++ b/Library/Homebrew/cask/cask_loader.rb @@ -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)}.") diff --git a/Library/Homebrew/cask/cmd/abstract_command.rb b/Library/Homebrew/cask/cmd/abstract_command.rb index afa69cc2fa03c..334fb69ebf444 100644 --- a/Library/Homebrew/cask/cmd/abstract_command.rb +++ b/Library/Homebrew/cask/cmd/abstract_command.rb @@ -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 diff --git a/Library/Homebrew/cask/cmd/internal_stanza.rb b/Library/Homebrew/cask/cmd/internal_stanza.rb index e134dd87d07fa..2ea3385426eed 100644 --- a/Library/Homebrew/cask/cmd/internal_stanza.rb +++ b/Library/Homebrew/cask/cmd/internal_stanza.rb @@ -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 diff --git a/Library/Homebrew/cask/download.rb b/Library/Homebrew/cask/download.rb index 30efff34fe5ba..a5b3d31f7496c 100644 --- a/Library/Homebrew/cask/download.rb +++ b/Library/Homebrew/cask/download.rb @@ -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 diff --git a/Library/Homebrew/cask/dsl.rb b/Library/Homebrew/cask/dsl.rb index 7c361dd14c998..3125316274ce3 100644 --- a/Library/Homebrew/cask/dsl.rb +++ b/Library/Homebrew/cask/dsl.rb @@ -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) @@ -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 diff --git a/Library/Homebrew/cask/dsl/caveats.rb b/Library/Homebrew/cask/dsl/caveats.rb index 55c77cb117437..e3a46f44bd429 100644 --- a/Library/Homebrew/cask/dsl/caveats.rb +++ b/Library/Homebrew/cask/dsl/caveats.rb @@ -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 diff --git a/Library/Homebrew/cask/dsl/container.rb b/Library/Homebrew/cask/dsl/container.rb index 22c146f31906f..852907b32ebea 100644 --- a/Library/Homebrew/cask/dsl/container.rb +++ b/Library/Homebrew/cask/dsl/container.rb @@ -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 diff --git a/Library/Homebrew/cask/dsl/depends_on.rb b/Library/Homebrew/cask/dsl/depends_on.rb index d4799d3899797..5bb3deda8b5d3 100644 --- a/Library/Homebrew/cask/dsl/depends_on.rb +++ b/Library/Homebrew/cask/dsl/depends_on.rb @@ -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 diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index c8f0ad3bc3d56..0f1467862d3ba 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -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 diff --git a/Library/Homebrew/cask/metadata.rb b/Library/Homebrew/cask/metadata.rb index 59145c579d919..20e5b8953ffe0 100644 --- a/Library/Homebrew/cask/metadata.rb +++ b/Library/Homebrew/cask/metadata.rb @@ -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 @@ -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 diff --git a/Library/Homebrew/cask/staged.rb b/Library/Homebrew/cask/staged.rb index 6069aef6b762f..bc05bb0b79fa1 100644 --- a/Library/Homebrew/cask/staged.rb +++ b/Library/Homebrew/cask/staged.rb @@ -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 diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index cd792cd349d84..75f0044047b7a 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -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? diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 2005550829e45..b6ce4a8ca6816 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -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 diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 15d9bb4b8052a..a2bde175f0f70 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -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 @@ -208,7 +208,7 @@ 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 @@ -216,7 +216,7 @@ def install 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 @@ -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 @@ -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 @@ -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: diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb index 6db1324d2ea2f..2952c86e3679f 100644 --- a/Library/Homebrew/cmd/link.rb +++ b/Library/Homebrew/cmd/link.rb @@ -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? diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index 06ca7888b53f3..42344b700b952 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -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 diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index b3a0d48e83d64..61bcb03e1e96b 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -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 @@ -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? @@ -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} diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 8b1ea9f54b8cf..c5b8080c5148d 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -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 } diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index 36257eda401dc..0006083576ad4 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -133,7 +133,7 @@ fetch() { odie < e # rubocop:disable Lint/RescueException opoo "The cleaning step did not complete successfully" - puts "Still, the installation was successful, so we will link it into your prefix" + puts "Still, the installation was successful, so we will link it into your prefix." odebug e, e.backtrace Homebrew.failed = true @show_summary_heading = true diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 45dfb71a2c833..8b7089bb57bf6 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -603,7 +603,7 @@ def resolve_any_conflicts(dst, dry_run: false, verbose: false, overwrite: false) begin keg = Keg.for(src) rescue NotAKegError - puts "Won't resolve conflicts for symlink #{dst} as it doesn't resolve into the Cellar" if verbose + puts "Won't resolve conflicts for symlink #{dst} as it doesn't resolve into the Cellar." if verbose return end diff --git a/Library/Homebrew/manpages/brew.1.md.erb b/Library/Homebrew/manpages/brew.1.md.erb index 057b4ddf1a2bc..194740e3fc2e5 100644 --- a/Library/Homebrew/manpages/brew.1.md.erb +++ b/Library/Homebrew/manpages/brew.1.md.erb @@ -104,7 +104,7 @@ can take several different forms: * An arbitrary file: Homebrew can install formulae from a local path. It can point to either a formula file or a bottle. - Prefix relative paths with `./` to prevent them being interpreted as a + Prefix relative paths with `./` to prevent them from being interpreted as a formula or tap name. ## SPECIFYING CASKS diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index 552f6b4f08ec5..1edc0f3375157 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -141,7 +141,7 @@ def deleted_reason(name, silent: false) ohai "Searching for a previously deleted formula (in the last month)..." if (tap.path/".git/shallow").exist? opoo <<~EOS - #{tap} is shallow clone. To get complete history run: + #{tap} is shallow clone. To get its complete history, run: git -C "$(brew --repo #{tap})" fetch --unshallow EOS @@ -168,10 +168,10 @@ def deleted_reason(name, silent: false) #{name} was deleted from #{tap.name} in commit #{short_hash}: #{commit_message} - To show the formula before removal run: + To show the formula before removal, run: git -C "$(brew --repo #{tap})" show #{short_hash}^:#{relative_path} - If you still use this formula consider creating your own tap: + If you still use this formula, consider creating your own tap: #{Formatter.url("https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap")} EOS end diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 41688a0f07b3d..4a3e729fe83ff 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -266,7 +266,7 @@ def update_instructions Update them from Software Update in #{software_update_location} or run: softwareupdate --all --install --force - If that doesn't show you an update run: + If that doesn't show you any updates, run: sudo rm -rf /Library/Developer/CommandLineTools sudo xcode-select --install diff --git a/Library/Homebrew/resource.rb b/Library/Homebrew/resource.rb index 39a65fdd9c18c..47920e13c88f5 100644 --- a/Library/Homebrew/resource.rb +++ b/Library/Homebrew/resource.rb @@ -150,7 +150,7 @@ def fetch(verify_download_integrity: true) def verify_download_integrity(fn) if fn.file? - ohai "Verifying checksum for '#{fn.basename}'." if verbose? + ohai "Verifying checksum for '#{fn.basename}'" if verbose? fn.verify_checksum(checksum) end rescue ChecksumMissingError diff --git a/Library/Homebrew/shims/linux/super/make b/Library/Homebrew/shims/linux/super/make index d47a25ec307d0..36412314a14f0 100755 --- a/Library/Homebrew/shims/linux/super/make +++ b/Library/Homebrew/shims/linux/super/make @@ -1,6 +1,6 @@ #!/bin/bash -pathremove () { +pathremove() { local IFS=':' NEWPATH="" DIR="" PATHVARIABLE=${2:-PATH} for DIR in ${!PATHVARIABLE} ; do if [ "$DIR" != "$1" ] ; then diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb index 971c2e8b51291..7d049c0c6270d 100644 --- a/Library/Homebrew/system_command.rb +++ b/Library/Homebrew/system_command.rb @@ -89,7 +89,7 @@ def initialize(executable, args: [], sudo: false, env: {}, input: [], must_succe env.each_key do |name| next if /^[\w&&\D]\w*$/.match?(name) - raise ArgumentError, "Invalid variable name: '#{name}'" + raise ArgumentError, "Invalid variable name: #{name}" end @env = env @input = Array(input) diff --git a/Library/Homebrew/test/cask/artifact/app_spec.rb b/Library/Homebrew/test/cask/artifact/app_spec.rb index 4cb1ad17fcd6e..23a5cd944fe9c 100644 --- a/Library/Homebrew/test/cask/artifact/app_spec.rb +++ b/Library/Homebrew/test/cask/artifact/app_spec.rb @@ -89,8 +89,8 @@ describe "target is both writable and user-owned" do it "overwrites the existing app" do stdout = <<~EOS - ==> Removing App '#{target_path}'. - ==> Moving App 'Caffeine.app' to '#{target_path}'. + ==> Removing App '#{target_path}' + ==> Moving App 'Caffeine.app' to '#{target_path}' EOS stderr = <<~EOS @@ -137,8 +137,8 @@ ).and_call_original stdout = <<~EOS - ==> Removing App '#{target_path}'. - ==> Moving App 'Caffeine.app' to '#{target_path}'. + ==> Removing App '#{target_path}' + ==> Moving App 'Caffeine.app' to '#{target_path}' EOS stderr = <<~EOS @@ -180,8 +180,8 @@ it "overwrites the existing app" do stdout = <<~EOS - ==> Removing App '#{target_path}'. - ==> Moving App 'Caffeine.app' to '#{target_path}'. + ==> Removing App '#{target_path}' + ==> Moving App 'Caffeine.app' to '#{target_path}' EOS stderr = <<~EOS diff --git a/Library/Homebrew/test/cask/cmd/install_spec.rb b/Library/Homebrew/test/cask/cmd/install_spec.rb index adb7b6da2be5d..4b2d9d984cf7e 100644 --- a/Library/Homebrew/test/cask/cmd/install_spec.rb +++ b/Library/Homebrew/test/cask/cmd/install_spec.rb @@ -12,7 +12,7 @@ output = Regexp.new <<~EOS ==> Downloading file:.*caffeine.zip ==> Installing Cask local-caffeine - ==> Moving App 'Caffeine.app' to '.*Caffeine.app'. + ==> Moving App 'Caffeine.app' to '.*Caffeine.app' .*local-caffeine was successfully installed! EOS @@ -118,7 +118,7 @@ }.to raise_error( Cask::CaskUnavailableError, "Cask 'localcaffeine' is unavailable: No Cask with this name exists. "\ - "Did you mean “local-caffeine”?", + "Did you mean 'local-caffeine'?", ) end diff --git a/Library/Homebrew/test/cask/cmd/reinstall_spec.rb b/Library/Homebrew/test/cask/cmd/reinstall_spec.rb index 4cf73637a1c5f..9dae6d67205bc 100644 --- a/Library/Homebrew/test/cask/cmd/reinstall_spec.rb +++ b/Library/Homebrew/test/cask/cmd/reinstall_spec.rb @@ -15,11 +15,11 @@ ==> Downloading file:.*caffeine.zip Already downloaded: .*--caffeine.zip ==> Uninstalling Cask local-caffeine - ==> Backing App 'Caffeine.app' up to '.*Caffeine.app'. - ==> Removing App '.*Caffeine.app'. + ==> Backing App 'Caffeine.app' up to '.*Caffeine.app' + ==> Removing App '.*Caffeine.app' ==> Purging files for version 1.2.3 of Cask local-caffeine ==> Installing Cask local-caffeine - ==> Moving App 'Caffeine.app' to '.*Caffeine.app'. + ==> Moving App 'Caffeine.app' to '.*Caffeine.app' .*local-caffeine was successfully installed! EOS diff --git a/Library/Homebrew/test/cask/cmd/uninstall_spec.rb b/Library/Homebrew/test/cask/cmd/uninstall_spec.rb index 8158d1c1143d2..703b9c7443141 100644 --- a/Library/Homebrew/test/cask/cmd/uninstall_spec.rb +++ b/Library/Homebrew/test/cask/cmd/uninstall_spec.rb @@ -15,8 +15,8 @@ output = Regexp.new <<~EOS ==> Uninstalling Cask local-caffeine - ==> Backing App 'Caffeine.app' up to '.*Caffeine.app'. - ==> Removing App '.*Caffeine.app'. + ==> Backing App 'Caffeine.app' up to '.*Caffeine.app' + ==> Removing App '.*Caffeine.app' ==> Purging files for version 1.2.3 of Cask local-caffeine EOS diff --git a/Library/Homebrew/test/diagnostic_checks_spec.rb b/Library/Homebrew/test/diagnostic_checks_spec.rb index 72a23e16d90de..e62e6af20aef0 100644 --- a/Library/Homebrew/test/diagnostic_checks_spec.rb +++ b/Library/Homebrew/test/diagnostic_checks_spec.rb @@ -70,7 +70,7 @@ expect(subject.check_user_path_1).to be nil expect(subject.check_user_path_2) - .to match("Homebrew's bin was not found in your PATH.") + .to match("Homebrew's \"bin\" was not found in your PATH.") end specify "#check_user_path_3" do @@ -83,7 +83,7 @@ expect(subject.check_user_path_1).to be nil expect(subject.check_user_path_2).to be nil expect(subject.check_user_path_3) - .to match("Homebrew's sbin was not found in your PATH") + .to match("Homebrew's \"sbin\" was not found in your PATH") ensure sbin.rmtree end diff --git a/Library/Homebrew/test/tap_spec.rb b/Library/Homebrew/test/tap_spec.rb index 691e5fa61cb7a..9a108ec90de71 100644 --- a/Library/Homebrew/test/tap_spec.rb +++ b/Library/Homebrew/test/tap_spec.rb @@ -194,7 +194,7 @@ def setup_completion(link:) expect(services_tap).not_to be_private end - it "returns nil if the Tap is not a Git repo" do + it "returns nil if the Tap is not a Git repository" do expect(subject.remote).to be nil end diff --git a/Library/Homebrew/unlink.rb b/Library/Homebrew/unlink.rb index 47384433e3d55..ef9ce40722244 100644 --- a/Library/Homebrew/unlink.rb +++ b/Library/Homebrew/unlink.rb @@ -24,7 +24,7 @@ def unlink(keg, dry_run: false, verbose: false) keg.lock do print "Unlinking #{keg}... " puts if verbose - puts "#{keg.unlink(**options)} symlinks removed" + puts "#{keg.unlink(**options)} symlinks removed." end end end diff --git a/Library/Homebrew/utils/ruby.sh b/Library/Homebrew/utils/ruby.sh index d8ee1f1fc31b8..7d09e4d83a055 100644 --- a/Library/Homebrew/utils/ruby.sh +++ b/Library/Homebrew/utils/ruby.sh @@ -1,6 +1,6 @@ export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.3 -test_ruby () { +test_ruby() { if [[ ! -x $1 ]] then return 1 diff --git a/completions/zsh/_brew b/completions/zsh/_brew index f2b5befc3dd2b..ea24e0e408df4 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -191,7 +191,7 @@ __brew_internal_commands() { 'test:Run the test method provided by an installed formula' 'tests:Run Homebrew'\''s unit and integration tests' 'typecheck:Check for typechecking errors using Sorbet' - 'unbottled:Outputs the unbottled dependents of formulae' + 'unbottled:Show the unbottled dependents of formulae' 'uninstall:Uninstall a formula or cask' 'unlink:Remove symlinks for formula from Homebrew'\''s prefix' 'unpack:Unpack the source files for formula into subdirectories of the current working directory' @@ -1197,7 +1197,7 @@ _brew_outdated() { '--formula[List only outdated formulae]' \ '--greedy[Print outdated casks with `auto_updates` or `version :latest`]' \ '--help[Show this message]' \ - '--json[Print output in JSON format. There are two versions: v1 and v2. v1 is deprecated and is currently the default if no version is specified. v2 prints outdated formulae and casks. ]' \ + '--json[Print output in JSON format. There are two versions: `v1` and `v2`. `v1` is deprecated and is currently the default if no version is specified. `v2` prints outdated formulae and casks. ]' \ '--quiet[List only the names of outdated kegs (takes precedence over `--verbose`)]' \ '--verbose[Include detailed version information]' \ '::formula:__brew_formulae' \ @@ -1599,11 +1599,11 @@ _brew_typecheck() { _brew_unbottled() { _arguments \ '--debug[Display any debugging information]' \ - '--dependents[Don'\''t get analytics data and sort by number of dependents instead]' \ + '--dependents[Skip getting analytics data and sort by number of dependents instead]' \ '--help[Show this message]' \ '--quiet[Make some output more quiet]' \ - '--tag[Use the specified bottle tag (e.g. big_sur) instead of the current OS]' \ - '--total[Output the number of unbottled and total formulae]' \ + '--tag[Use the specified bottle tag (e.g. `big_sur`) instead of the current OS]' \ + '--total[Print the number of unbottled and total formulae]' \ '--verbose[Make some output more verbose]' \ '::formula:__brew_formulae' } diff --git a/docs/Manpage.md b/docs/Manpage.md index 4b7e846a69c0a..fa4072acb45d0 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -418,7 +418,7 @@ information is displayed in interactive shells, and suppressed otherwise. * `--cask`: List only outdated casks. * `--json`: - Print output in JSON format. There are two versions: v1 and v2. v1 is deprecated and is currently the default if no version is specified. v2 prints outdated formulae and casks. + Print output in JSON format. There are two versions: `v1` and `v2`. `v1` is deprecated and is currently the default if no version is specified. `v2` prints outdated formulae and casks. * `--fetch-HEAD`: Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released. * `--greedy`: @@ -500,9 +500,9 @@ No online search is performed. * `--pull-request`: Search for GitHub pull requests containing *`text`*. * `--open`: - Search for only open GitHub pull requests + Search for only open GitHub pull requests. * `--closed`: - Search for only closed GitHub pull requests + Search for only closed GitHub pull requests. * `--macports`: Search for *`text`* in the given package manager's list. * `--fink`: @@ -765,6 +765,10 @@ non-zero status if any errors are found. Run additional, slower style checks that require a network connection. * `--new`: Run various additional style checks to determine if a new formula or cask is eligible for Homebrew. This should be used when creating new formula and implies `--strict` and `--online`. +* `--[no-]appcast`: + Audit the appcast. +* `--token-conflicts`: + Audit for token conflicts. * `--tap`: Check the formulae within the given tap, specified as *`user`*`/`*`repo`*. * `--fix`: @@ -789,10 +793,6 @@ non-zero status if any errors are found. Treat all named arguments as formulae. * `--cask`: Treat all named arguments as casks. -* `--[no-]appcast`: - Audit the appcast -* `--token-conflicts`: - Audit for token conflicts ### `bottle` [*`options`*] *`installed_formula`*|*`file`* [...] @@ -1093,7 +1093,7 @@ casks to check is taken from `HOMEBREW_LIVECHECK_WATCHLIST` or Generate Homebrew's manpages. -Not (yet) working on Apple Silicon. +*Note:* Not (yet) working on Apple Silicon. * `--fail-if-changed`: Return a failing status code if changes are detected in the manpage outputs. This can be used to notify CI when the manpages are out of date. Additionally, the date used in new manpages will match those in the existing manpages (to allow comparison without factoring in the date). @@ -1362,14 +1362,14 @@ Not (yet) working on Apple Silicon. ### `unbottled` [*`options`*] [*`formula`* ...] -Outputs the unbottled dependents of formulae. +Show the unbottled dependents of formulae. * `--tag`: - Use the specified bottle tag (e.g. big_sur) instead of the current OS. + Use the specified bottle tag (e.g. `big_sur`) instead of the current OS. * `--dependents`: - Don't get analytics data and sort by number of dependents instead. + Skip getting analytics data and sort by number of dependents instead. * `--total`: - Output the number of unbottled and total formulae. + Print the number of unbottled and total formulae. ### `unpack` [*`options`*] *`formula`* [...] @@ -1676,7 +1676,7 @@ can take several different forms: * An arbitrary file: Homebrew can install formulae from a local path. It can point to either a formula file or a bottle. - Prefix relative paths with `./` to prevent them being interpreted as a + Prefix relative paths with `./` to prevent them from being interpreted as a formula or tap name. ## SPECIFYING CASKS @@ -1697,7 +1697,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just *Default:* `native`. - `HOMEBREW_ARTIFACT_DOMAIN` -
Prefix all download URLs, including those for bottles, with this variable. For example, `HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080` will cause a formula with the URL `https://example.com/foo.tar.gz` to instead download from `http://localhost:8080/example.com/foo.tar.gz`. +
Prefix all download URLs, including those for bottles, with this value. For example, `HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080` will cause a formula with the URL `https://example.com/foo.tar.gz` to instead download from `http://localhost:8080/example.com/foo.tar.gz`. - `HOMEBREW_AUTO_UPDATE_SECS`
Automatically check for updates once per this seconds interval. @@ -1878,7 +1878,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just *Note:* While ensuring your downloads are fully secure, this is likely to cause from-source SourceForge, some GNU & GNOME-hosted formulae to fail to download. - `HOMEBREW_NO_INSTALL_CLEANUP` -
If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS days. +
If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every `HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS` days. - `HOMEBREW_PRY`
If set, use Pry for the `brew irb` command. diff --git a/manpages/brew.1 b/manpages/brew.1 index c3d90f7d6a858..b1c21484ab4c4 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -565,7 +565,7 @@ List only outdated casks\. . .TP \fB\-\-json\fR -Print output in JSON format\. There are two versions: v1 and v2\. v1 is deprecated and is currently the default if no version is specified\. v2 prints outdated formulae and casks\. +Print output in JSON format\. There are two versions: \fBv1\fR and \fBv2\fR\. \fBv1\fR is deprecated and is currently the default if no version is specified\. \fBv2\fR prints outdated formulae and casks\. . .TP \fB\-\-fetch\-HEAD\fR @@ -678,11 +678,11 @@ Search for GitHub pull requests containing \fItext\fR\. . .TP \fB\-\-open\fR -Search for only open GitHub pull requests +Search for only open GitHub pull requests\. . .TP \fB\-\-closed\fR -Search for only closed GitHub pull requests +Search for only closed GitHub pull requests\. . .TP \fB\-\-macports\fR @@ -1030,6 +1030,14 @@ Run additional, slower style checks that require a network connection\. Run various additional style checks to determine if a new formula or cask is eligible for Homebrew\. This should be used when creating new formula and implies \fB\-\-strict\fR and \fB\-\-online\fR\. . .TP +\fB\-\-[no\-]appcast\fR +Audit the appcast\. +. +.TP +\fB\-\-token\-conflicts\fR +Audit for token conflicts\. +. +.TP \fB\-\-tap\fR Check the formulae within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\. . @@ -1077,14 +1085,6 @@ Treat all named arguments as formulae\. \fB\-\-cask\fR Treat all named arguments as casks\. . -.TP -\fB\-\-[no\-]appcast\fR -Audit the appcast -. -.TP -\fB\-\-token\-conflicts\fR -Audit for token conflicts -. .SS "\fBbottle\fR [\fIoptions\fR] \fIinstalled_formula\fR|\fIfile\fR [\.\.\.]" Generate a bottle (binary package) from a formula that was installed with \fB\-\-build\-bottle\fR\. If the formula specifies a rebuild version, it will be incremented in the generated DSL\. Passing \fB\-\-keep\-old\fR will attempt to keep it at its original value, while \fB\-\-no\-rebuild\fR will remove it\. . @@ -1506,7 +1506,7 @@ Only check casks\. Generate Homebrew\'s manpages\. . .P -Not (yet) working on Apple Silicon\. +\fINote:\fR Not (yet) working on Apple Silicon\. . .TP \fB\-\-fail\-if\-changed\fR @@ -1878,19 +1878,19 @@ Typecheck a single file\. Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet)\. . .SS "\fBunbottled\fR [\fIoptions\fR] [\fIformula\fR \.\.\.]" -Outputs the unbottled dependents of formulae\. +Show the unbottled dependents of formulae\. . .TP \fB\-\-tag\fR -Use the specified bottle tag (e\.g\. big_sur) instead of the current OS\. +Use the specified bottle tag (e\.g\. \fBbig_sur\fR) instead of the current OS\. . .TP \fB\-\-dependents\fR -Don\'t get analytics data and sort by number of dependents instead\. +Skip getting analytics data and sort by number of dependents instead\. . .TP \fB\-\-total\fR -Output the number of unbottled and total formulae\. +Print the number of unbottled and total formulae\. . .SS "\fBunpack\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]" Unpack the source files for \fIformula\fR into subdirectories of the current working directory\. @@ -2322,7 +2322,7 @@ Sometimes a formula from a tapped repository may conflict with one in \fBhomebre . .TP An arbitrary file -Homebrew can install formulae from a local path\. It can point to either a formula file or a bottle\. Prefix relative paths with \fB\./\fR to prevent them being interpreted as a formula or tap name\. +Homebrew can install formulae from a local path\. It can point to either a formula file or a bottle\. Prefix relative paths with \fB\./\fR to prevent them from being interpreted as a formula or tap name\. . .SH "SPECIFYING CASKS" Many Homebrew Cask commands accept one or more \fIcask\fR arguments\. These can be specified the same way as the \fIformula\fR arguments described in \fBSPECIFYING FORMULAE\fR above\. @@ -2343,7 +2343,7 @@ Linux only: Pass this value to a type name representing the compiler\'s \fB\-mar \fBHOMEBREW_ARTIFACT_DOMAIN\fR . .br -Prefix all download URLs, including those for bottles, with this variable\. For example, \fBHOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080\fR will cause a formula with the URL \fBhttps://example\.com/foo\.tar\.gz\fR to instead download from \fBhttp://localhost:8080/example\.com/foo\.tar\.gz\fR\. +Prefix all download URLs, including those for bottles, with this value\. For example, \fBHOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080\fR will cause a formula with the URL \fBhttps://example\.com/foo\.tar\.gz\fR to instead download from \fBhttp://localhost:8080/example\.com/foo\.tar\.gz\fR\. . .TP \fBHOMEBREW_AUTO_UPDATE_SECS\fR @@ -2682,7 +2682,7 @@ If set, forbid redirects from secure HTTPS to insecure HTTP\. \fBHOMEBREW_NO_INSTALL_CLEANUP\fR . .br -If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS days\. +If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every \fBHOMEBREW_CLEANUP_PERIODIC_FULL_DAYS\fR days\. . .TP \fBHOMEBREW_PRY\fR