messages/comments: wording fixes
This commit is contained in:
parent
e021953db4
commit
827480f06b
@ -27,7 +27,7 @@ module Homebrew
|
|||||||
api_url = "#{HOMEBREW_API_DEFAULT_DOMAIN}/#{endpoint}"
|
api_url = "#{HOMEBREW_API_DEFAULT_DOMAIN}/#{endpoint}"
|
||||||
output = Utils::Curl.curl_output("--fail", api_url)
|
output = Utils::Curl.curl_output("--fail", api_url)
|
||||||
end
|
end
|
||||||
raise ArgumentError, "No file found at #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
|
raise ArgumentError, "No file found at: #{Tty.underline}#{api_url}#{Tty.reset}" unless output.success?
|
||||||
|
|
||||||
cache[endpoint] = JSON.parse(output.stdout, freeze: true)
|
cache[endpoint] = JSON.parse(output.stdout, freeze: true)
|
||||||
rescue JSON::ParserError
|
rescue JSON::ParserError
|
||||||
|
@ -88,8 +88,8 @@ module Homebrew
|
|||||||
|
|
||||||
sig { override.void }
|
sig { override.void }
|
||||||
def run
|
def run
|
||||||
raise UsageError, "`brew deps --os=all` is not supported" if args.os == "all"
|
raise UsageError, "`brew deps --os=all` is not supported." if args.os == "all"
|
||||||
raise UsageError, "`brew deps --arch=all` is not supported" if args.arch == "all"
|
raise UsageError, "`brew deps --arch=all` is not supported." if args.arch == "all"
|
||||||
|
|
||||||
os, arch = T.must(args.os_arch_combinations.first)
|
os, arch = T.must(args.os_arch_combinations.first)
|
||||||
eval_all = args.eval_all?
|
eval_all = args.eval_all?
|
||||||
|
@ -40,7 +40,7 @@ class CompilerFailure
|
|||||||
# Non-Apple compilers are in the format fails_with compiler => version
|
# Non-Apple compilers are in the format fails_with compiler => version
|
||||||
if spec.is_a?(Hash)
|
if spec.is_a?(Hash)
|
||||||
compiler, major_version = spec.first
|
compiler, major_version = spec.first
|
||||||
raise ArgumentError, "The hash `fails_with` syntax only supports GCC" if compiler != :gcc
|
raise ArgumentError, "The `fails_with` hash syntax only supports GCC" if compiler != :gcc
|
||||||
|
|
||||||
type = compiler
|
type = compiler
|
||||||
# so fails_with :gcc => '7' simply marks all 7 releases incompatible
|
# so fails_with :gcc => '7' simply marks all 7 releases incompatible
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections):
|
# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections):
|
||||||
# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`.
|
# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`.
|
||||||
# - For `.rb` files, edit the `<command>_args` method.
|
# - For `.rb` files, edit the `cmd_args` block.
|
||||||
# - For `.sh` files, edit the top comment, being sure to use the line prefix
|
# - For `.sh` files, edit the top comment, being sure to use the line prefix
|
||||||
# `#:` for the comments to be recognized as documentation. If in doubt,
|
# `#:` for the comments to be recognized as documentation. If in doubt,
|
||||||
# compare with already documented commands.
|
# compare with already documented commands.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections):
|
# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections):
|
||||||
# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`.
|
# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`.
|
||||||
# - For `.rb` files, edit the `<command>_args` method.
|
# - For `.rb` files, edit the `cmd_args` block.
|
||||||
# - For `.sh` files, edit the top comment, being sure to use the line prefix
|
# - For `.sh` files, edit the top comment, being sure to use the line prefix
|
||||||
# `#:` for the comments to be recognized as documentation. If in doubt,
|
# `#:` for the comments to be recognized as documentation. If in doubt,
|
||||||
# compare with already documented commands.
|
# compare with already documented commands.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections):
|
# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections):
|
||||||
# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`.
|
# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`.
|
||||||
# - For `.rb` files, edit the `<command>_args` method.
|
# - For `.rb` files, edit the `cmd_args` block.
|
||||||
# - For `.sh` files, edit the top comment, being sure to use the line prefix
|
# - For `.sh` files, edit the top comment, being sure to use the line prefix
|
||||||
# `#:` for the comments to be recognized as documentation. If in doubt,
|
# `#:` for the comments to be recognized as documentation. If in doubt,
|
||||||
# compare with already documented commands.
|
# compare with already documented commands.
|
||||||
|
@ -169,7 +169,7 @@ class DependencyCollector
|
|||||||
when :maximum_macos then MacOSRequirement.new(tags, comparator: "<=")
|
when :maximum_macos then MacOSRequirement.new(tags, comparator: "<=")
|
||||||
when :xcode then XcodeRequirement.new(tags)
|
when :xcode then XcodeRequirement.new(tags)
|
||||||
else
|
else
|
||||||
raise ArgumentError, "Unsupported special dependency #{spec.inspect}"
|
raise ArgumentError, "Unsupported special dependency: #{spec.inspect}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1600,7 +1600,7 @@ class DownloadStrategyDetector
|
|||||||
detect_from_symbol(using)
|
detect_from_symbol(using)
|
||||||
else
|
else
|
||||||
raise TypeError,
|
raise TypeError,
|
||||||
"Unknown download strategy specification #{using.inspect}"
|
"Unknown download strategy specification: #{using.inspect}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ module Homebrew
|
|||||||
formula_suffix = stable.version.patch.to_i
|
formula_suffix = stable.version.patch.to_i
|
||||||
throttled_rate = formula.livecheck.throttle
|
throttled_rate = formula.livecheck.throttle
|
||||||
if throttled_rate && formula_suffix.modulo(throttled_rate).nonzero?
|
if throttled_rate && formula_suffix.modulo(throttled_rate).nonzero?
|
||||||
problem "should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}"
|
problem "Should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}"
|
||||||
end
|
end
|
||||||
|
|
||||||
case (url = stable.url)
|
case (url = stable.url)
|
||||||
|
@ -477,7 +477,7 @@ class FormulaInstaller
|
|||||||
|
|
||||||
raise CannotInstallFormulaError,
|
raise CannotInstallFormulaError,
|
||||||
"You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \
|
"You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \
|
||||||
"#{formula.full_name} requires the latest version of pinned dependencies"
|
"#{formula.full_name} requires the latest version of pinned dependencies."
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { params(_formula: Formula).returns(T.nilable(T::Boolean)) }
|
sig { params(_formula: Formula).returns(T.nilable(T::Boolean)) }
|
||||||
|
@ -711,7 +711,7 @@ module Formulary
|
|||||||
if ALLOWED_URL_SCHEMES.exclude?(url_scheme)
|
if ALLOWED_URL_SCHEMES.exclude?(url_scheme)
|
||||||
raise UnsupportedInstallationMethod,
|
raise UnsupportedInstallationMethod,
|
||||||
"Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! " \
|
"Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! " \
|
||||||
"`brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap " \
|
"Use `brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap " \
|
||||||
"on GitHub instead."
|
"on GitHub instead."
|
||||||
end
|
end
|
||||||
HOMEBREW_CACHE_FORMULA.mkpath
|
HOMEBREW_CACHE_FORMULA.mkpath
|
||||||
|
@ -83,10 +83,10 @@ module Homebrew
|
|||||||
skip_link: false,
|
skip_link: false,
|
||||||
overwrite: false
|
overwrite: false
|
||||||
)
|
)
|
||||||
# head-only without --HEAD is an error
|
# HEAD-only without --HEAD is an error
|
||||||
if !head && formula.stable.nil?
|
if !head && formula.stable.nil?
|
||||||
odie <<~EOS
|
odie <<~EOS
|
||||||
#{formula.full_name} is a head-only formula.
|
#{formula.full_name} is a HEAD-only formula.
|
||||||
To install it, run:
|
To install it, run:
|
||||||
brew install --HEAD #{formula.full_name}
|
brew install --HEAD #{formula.full_name}
|
||||||
EOS
|
EOS
|
||||||
|
@ -286,7 +286,7 @@ module Language
|
|||||||
def slice_resources!(resources_hash, resource_names)
|
def slice_resources!(resources_hash, resource_names)
|
||||||
resource_names.map do |resource_name|
|
resource_names.map do |resource_name|
|
||||||
resources_hash.delete(resource_name) do
|
resources_hash.delete(resource_name) do
|
||||||
raise ArgumentError, "Resource \"#{resource_name}\" is not defined in formula or is already used"
|
raise ArgumentError, "Resource \"#{resource_name}\" is not defined in formula or is already used."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -245,7 +245,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Use the `stable` version for comparison except for installed
|
# Use the `stable` version for comparison except for installed
|
||||||
# head-only formulae. A formula with `stable` and `head` that's
|
# HEAD-only formulae. A formula with `stable` and `head` that's
|
||||||
# installed using `--head` will still use the `stable` version for
|
# installed using `--head` will still use the `stable` version for
|
||||||
# comparison.
|
# comparison.
|
||||||
current = if formula
|
current = if formula
|
||||||
|
@ -24,7 +24,7 @@ module Patch
|
|||||||
when nil
|
when nil
|
||||||
raise ArgumentError, "nil value for strip"
|
raise ArgumentError, "nil value for strip"
|
||||||
else
|
else
|
||||||
raise ArgumentError, "Unexpected value #{strip.inspect} for strip"
|
raise ArgumentError, "Unexpected value for strip: #{strip.inspect}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,7 @@ module Homebrew
|
|||||||
|
|
||||||
def audit_version
|
def audit_version
|
||||||
if version.nil?
|
if version.nil?
|
||||||
problem "missing version"
|
problem "Missing version"
|
||||||
elsif owner.is_a?(Formula) && !version.to_s.match?(GitHubPackages::VALID_OCI_TAG_REGEX) &&
|
elsif owner.is_a?(Formula) && !version.to_s.match?(GitHubPackages::VALID_OCI_TAG_REGEX) &&
|
||||||
(owner.core_formula? ||
|
(owner.core_formula? ||
|
||||||
(owner.bottle_defined? && GitHubPackages::URL_REGEX.match?(owner.bottle_specification.root_url)))
|
(owner.bottle_defined? && GitHubPackages::URL_REGEX.match?(owner.bottle_specification.root_url)))
|
||||||
@ -137,7 +137,7 @@ module Homebrew
|
|||||||
# TODO: try remove the OS/env conditional
|
# TODO: try remove the OS/env conditional
|
||||||
if Homebrew::SimulateSystem.simulating_or_running_on_macos? && spec_name == :stable &&
|
if Homebrew::SimulateSystem.simulating_or_running_on_macos? && spec_name == :stable &&
|
||||||
owner.name != "ca-certificates" && curl_dep && !urls.find { |u| u.start_with?("http://") }
|
owner.name != "ca-certificates" && curl_dep && !urls.find { |u| u.start_with?("http://") }
|
||||||
problem "should always include at least one HTTP mirror"
|
problem "Should always include at least one HTTP mirror"
|
||||||
end
|
end
|
||||||
|
|
||||||
return unless @online
|
return unless @online
|
||||||
|
@ -258,7 +258,7 @@ class Sandbox
|
|||||||
invalid_char = ['"', "'", "(", ")", "\n", "\\"].find do |c|
|
invalid_char = ['"', "'", "(", ")", "\n", "\\"].find do |c|
|
||||||
path.to_s.include?(c)
|
path.to_s.include?(c)
|
||||||
end
|
end
|
||||||
raise ArgumentError, "Invalid character #{invalid_char} in path: #{path}" if invalid_char
|
raise ArgumentError, "Invalid character '#{invalid_char}' in path: #{path}" if invalid_char
|
||||||
|
|
||||||
case type
|
case type
|
||||||
when :regex then "regex #\"#{path}\""
|
when :regex then "regex #\"#{path}\""
|
||||||
|
@ -164,7 +164,7 @@ module Homebrew
|
|||||||
@keep_alive = { always: value }
|
@keep_alive = { always: value }
|
||||||
when Hash
|
when Hash
|
||||||
unless (value.keys - KEEP_ALIVE_KEYS).empty?
|
unless (value.keys - KEEP_ALIVE_KEYS).empty?
|
||||||
raise TypeError, "Service#keep_alive allows only #{KEEP_ALIVE_KEYS}"
|
raise TypeError, "Service#keep_alive only allows: #{KEEP_ALIVE_KEYS}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@keep_alive = value
|
@keep_alive = value
|
||||||
|
@ -71,7 +71,7 @@ module Homebrew
|
|||||||
Dir["#{System.path}homebrew.*.{plist,service}"].each do |file|
|
Dir["#{System.path}homebrew.*.{plist,service}"].each do |file|
|
||||||
next if running.include?(File.basename(file).sub(/\.(plist|service)$/i, ""))
|
next if running.include?(File.basename(file).sub(/\.(plist|service)$/i, ""))
|
||||||
|
|
||||||
puts "Removing unused service file #{file}"
|
puts "Removing unused service file: #{file}"
|
||||||
rm file
|
rm file
|
||||||
cleaned << file
|
cleaned << file
|
||||||
end
|
end
|
||||||
@ -90,7 +90,7 @@ module Homebrew
|
|||||||
def self.run(targets, service_file = nil, verbose: false)
|
def self.run(targets, service_file = nil, verbose: false)
|
||||||
if service_file.present?
|
if service_file.present?
|
||||||
file = Pathname.new service_file
|
file = Pathname.new service_file
|
||||||
raise UsageError, "Provided service file does not exist" unless file.exist?
|
raise UsageError, "Provided service file does not exist." unless file.exist?
|
||||||
end
|
end
|
||||||
|
|
||||||
targets.each do |service|
|
targets.each do |service|
|
||||||
@ -119,7 +119,7 @@ module Homebrew
|
|||||||
|
|
||||||
if service_file.present?
|
if service_file.present?
|
||||||
file = Pathname.new service_file
|
file = Pathname.new service_file
|
||||||
raise UsageError, "Provided service file does not exist" unless file.exist?
|
raise UsageError, "Provided service file does not exist." unless file.exist?
|
||||||
end
|
end
|
||||||
|
|
||||||
targets.each do |service|
|
targets.each do |service|
|
||||||
@ -373,11 +373,11 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.install_service_file(service, file)
|
def self.install_service_file(service, file)
|
||||||
raise UsageError, "Formula `#{service.name}` is not installed" unless service.installed?
|
raise UsageError, "Formula `#{service.name}` is not installed." unless service.installed?
|
||||||
|
|
||||||
unless service.service_file.exist?
|
unless service.service_file.exist?
|
||||||
raise UsageError,
|
raise UsageError,
|
||||||
"Formula `#{service.name}` has not implemented #plist, #service or installed a locatable service file"
|
"Formula `#{service.name}` has not implemented #plist, #service or provided a locatable service file."
|
||||||
end
|
end
|
||||||
|
|
||||||
temp = Tempfile.new(service.service_name)
|
temp = Tempfile.new(service.service_name)
|
||||||
@ -386,7 +386,7 @@ module Homebrew
|
|||||||
|
|
||||||
if sudo_service_user && System.launchctl?
|
if sudo_service_user && System.launchctl?
|
||||||
# set the username in the new plist file
|
# set the username in the new plist file
|
||||||
ohai "Setting username in #{service.service_name} to #{System.user}"
|
ohai "Setting username in #{service.service_name} to: #{System.user}"
|
||||||
plist_data = Plist.parse_xml(contents, marshal: false)
|
plist_data = Plist.parse_xml(contents, marshal: false)
|
||||||
plist_data["UserName"] = sudo_service_user
|
plist_data["UserName"] = sudo_service_user
|
||||||
plist_data.to_plist
|
plist_data.to_plist
|
||||||
|
@ -35,5 +35,5 @@ fi
|
|||||||
try_exec_non_system "${HOMEBREW_CURL:-curl}" "$@"
|
try_exec_non_system "${HOMEBREW_CURL:-curl}" "$@"
|
||||||
safe_exec "/usr/bin/curl" "$@"
|
safe_exec "/usr/bin/curl" "$@"
|
||||||
|
|
||||||
echo "Could not execute curl. Try HOMEBREW_FORCE_BREWED_CURL=1" >&2
|
echo "Could not execute curl. Try setting HOMEBREW_FORCE_BREWED_CURL=1" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash -p
|
#!/bin/bash -p
|
||||||
|
|
||||||
# This script because we support $HOMEBREW_GIT, $HOMEBREW_SVN, etc., Xcode-only and
|
# This script exists because we support $HOMEBREW_GIT, $HOMEBREW_SVN etc., and Xcode-only
|
||||||
# no Xcode/CLT configurations. Order is careful to be what the user would want.
|
# or no Xcode/CLT configurations. Order is careful to be what the user would want.
|
||||||
|
|
||||||
# HOMEBREW_LIBRARY is set by bin/brew
|
# HOMEBREW_LIBRARY is set by bin/brew
|
||||||
# SHIM_FILE is set by shims/utils.sh
|
# SHIM_FILE is set by shims/utils.sh
|
||||||
# HOMEBREW_GIT is set by brew.sh
|
# HOMEBREW_GIT is set by brew.sh
|
||||||
# HOMEBREW_SVN is from the user environment.
|
# HOMEBREW_SVN is from the user environment
|
||||||
# HOMEBREW_PREFIX is set by extend/ENV/super.rb
|
# HOMEBREW_PREFIX is set by extend/ENV/super.rb
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
if [[ -z "${HOMEBREW_LIBRARY}" ]]
|
if [[ -z "${HOMEBREW_LIBRARY}" ]]
|
||||||
|
@ -834,7 +834,7 @@ RSpec.describe Homebrew::FormulaAuditor do
|
|||||||
RUBY
|
RUBY
|
||||||
|
|
||||||
fa.audit_specs
|
fa.audit_specs
|
||||||
expect(fa.problems.first[:message]).to match "should only be updated every 10 releases on multiples of 10"
|
expect(fa.problems.first[:message]).to match "Should only be updated every 10 releases on multiples of 10"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "allows non-versioned formulae to have a `HEAD` spec" do
|
it "allows non-versioned formulae to have a `HEAD` spec" do
|
||||||
|
@ -68,7 +68,7 @@ RSpec.describe Formula do
|
|||||||
end.to fail_with_invalid :version
|
end.to fail_with_invalid :version
|
||||||
end
|
end
|
||||||
|
|
||||||
specify "head-only is valid" do
|
specify "HEAD-only is valid" do
|
||||||
f = formula do
|
f = formula do
|
||||||
head "foo"
|
head "foo"
|
||||||
end
|
end
|
||||||
|
@ -68,7 +68,7 @@ RSpec.describe Homebrew::Service do
|
|||||||
|
|
||||||
expect do
|
expect do
|
||||||
f.service.manual_command
|
f.service.manual_command
|
||||||
end.to raise_error TypeError, "Service#keep_alive allows only [:always, :successful_exit, :crashed, :path]"
|
end.to raise_error TypeError, "Service#keep_alive only allows: [:always, :successful_exit, :crashed, :path]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ RSpec.describe Homebrew::Services::Cli do
|
|||||||
expect(Homebrew::Services::System).not_to receive(:root?)
|
expect(Homebrew::Services::System).not_to receive(:root?)
|
||||||
expect do
|
expect do
|
||||||
services_cli.start(["service_name"], "/non/existent/path")
|
services_cli.start(["service_name"], "/non/existent/path")
|
||||||
end.to raise_error(UsageError, "Invalid usage: Provided service file does not exist")
|
end.to raise_error(UsageError, "Invalid usage: Provided service file does not exist.")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks empty targets cause no error" do
|
it "checks empty targets cause no error" do
|
||||||
@ -112,7 +112,7 @@ RSpec.describe Homebrew::Services::Cli do
|
|||||||
expect(Homebrew::Services::System).not_to receive(:root?)
|
expect(Homebrew::Services::System).not_to receive(:root?)
|
||||||
expect do
|
expect do
|
||||||
services_cli.start(["service_name"], "/hfdkjshksdjhfkjsdhf/fdsjghsdkjhb")
|
services_cli.start(["service_name"], "/hfdkjshksdjhfkjsdhf/fdsjghsdkjhb")
|
||||||
end.to raise_error(UsageError, "Invalid usage: Provided service file does not exist")
|
end.to raise_error(UsageError, "Invalid usage: Provided service file does not exist.")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks empty targets cause no error" do
|
it "checks empty targets cause no error" do
|
||||||
@ -165,7 +165,7 @@ RSpec.describe Homebrew::Services::Cli do
|
|||||||
service = instance_double(Homebrew::Services::FormulaWrapper, name: "name", installed?: false)
|
service = instance_double(Homebrew::Services::FormulaWrapper, name: "name", installed?: false)
|
||||||
expect do
|
expect do
|
||||||
services_cli.install_service_file(service, nil)
|
services_cli.install_service_file(service, nil)
|
||||||
end.to raise_error(UsageError, "Invalid usage: Formula `name` is not installed")
|
end.to raise_error(UsageError, "Invalid usage: Formula `name` is not installed.")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks service file exists" do
|
it "checks service file exists" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user