mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
grammar fixes
This commit is contained in:
parent
73d2d956cf
commit
fa6404e0f5
@ -15,7 +15,7 @@ module Cask
|
|||||||
def install_phase(**)
|
def install_phase(**)
|
||||||
puts <<~EOS
|
puts <<~EOS
|
||||||
To complete the installation of Cask #{cask}, you must also
|
To complete the installation of Cask #{cask}, you must also
|
||||||
run the installer at
|
run the installer at:
|
||||||
|
|
||||||
'#{cask.staged_path.join(path)}'
|
'#{cask.staged_path.join(path)}'
|
||||||
EOS
|
EOS
|
||||||
|
@ -65,7 +65,7 @@ module Cask
|
|||||||
return if failed.empty?
|
return if failed.empty?
|
||||||
|
|
||||||
$stderr.puts
|
$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
|
end
|
||||||
|
|
||||||
def passed_ci(pr)
|
def passed_ci(pr)
|
||||||
|
@ -47,11 +47,11 @@ module Cask
|
|||||||
next if MacOS.version < :high_sierra
|
next if MacOS.version < :high_sierra
|
||||||
|
|
||||||
<<~EOS
|
<<~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
|
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")}
|
#{Formatter.url("https://developer.apple.com/library/content/technotes/tn2459/_index.html")}
|
||||||
EOS
|
EOS
|
||||||
@ -60,7 +60,7 @@ module Cask
|
|||||||
caveat :path_environment_variable do |path|
|
caveat :path_environment_variable do |path|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
To use #{@cask}, you may need to add the #{path} directory
|
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"
|
export PATH=#{path}:"$PATH"
|
||||||
EOS
|
EOS
|
||||||
@ -89,19 +89,19 @@ module Cask
|
|||||||
caveat :depends_on_java do |java_version = :any|
|
caveat :depends_on_java do |java_version = :any|
|
||||||
if java_version == :any
|
if java_version == :any
|
||||||
<<~EOS
|
<<~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
|
brew cask install java
|
||||||
EOS
|
EOS
|
||||||
elsif java_version.include?("11") || java_version.include?("+")
|
elsif java_version.include?("11") || java_version.include?("+")
|
||||||
<<~EOS
|
<<~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
|
brew cask install java
|
||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
<<~EOS
|
<<~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}
|
brew cask install homebrew/cask-versions/java#{java_version}
|
||||||
EOS
|
EOS
|
||||||
@ -130,14 +130,14 @@ module Cask
|
|||||||
|
|
||||||
caveat :license do |web_page|
|
caveat :license do |web_page|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Installing #{@cask} means you have AGREED to the license at
|
Installing #{@cask} means you have AGREED to the license at:
|
||||||
#{web_page}
|
#{web_page}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
caveat :free_license do |web_page|
|
caveat :free_license do |web_page|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
The vendor offers a free license for #{@cask} at
|
The vendor offers a free license for #{@cask} at:
|
||||||
#{web_page}
|
#{web_page}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
@ -62,10 +62,10 @@ module Cask
|
|||||||
class CaskX11DependencyError < AbstractCaskErrorWithToken
|
class CaskX11DependencyError < AbstractCaskErrorWithToken
|
||||||
def to_s
|
def to_s
|
||||||
<<~EOS
|
<<~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")}
|
#{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/")}
|
#{Formatter.url("https://www.xquartz.org/")}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
@ -438,7 +438,7 @@ module Cask
|
|||||||
end
|
end
|
||||||
|
|
||||||
def uninstall_artifacts(clear: false)
|
def uninstall_artifacts(clear: false)
|
||||||
odebug "Un-installing artifacts"
|
odebug "Uninstalling artifacts"
|
||||||
artifacts = @cask.artifacts
|
artifacts = @cask.artifacts
|
||||||
|
|
||||||
odebug "#{artifacts.length} artifact/s defined", artifacts
|
odebug "#{artifacts.length} artifact/s defined", artifacts
|
||||||
|
@ -272,11 +272,11 @@ module Homebrew
|
|||||||
def initialize(arg1, arg2, missing: false)
|
def initialize(arg1, arg2, missing: false)
|
||||||
if !missing
|
if !missing
|
||||||
message = <<~EOS
|
message = <<~EOS
|
||||||
`#{arg1}` and `#{arg2}` should be passed together
|
`#{arg1}` and `#{arg2}` should be passed together.
|
||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
message = <<~EOS
|
message = <<~EOS
|
||||||
`#{arg2}` cannot be passed without `#{arg1}`
|
`#{arg2}` cannot be passed without `#{arg1}`.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
super message
|
super message
|
||||||
@ -296,7 +296,7 @@ module Homebrew
|
|||||||
class InvalidConstraintError < RuntimeError
|
class InvalidConstraintError < RuntimeError
|
||||||
def initialize(arg1, arg2)
|
def initialize(arg1, arg2)
|
||||||
super <<~EOS
|
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
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -231,8 +231,8 @@ module Homebrew
|
|||||||
# Check if the formula we try to install is the same as installed
|
# Check if the formula we try to install is the same as installed
|
||||||
# but not migrated one. If --force passed then install anyway.
|
# but not migrated one. If --force passed then install anyway.
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
#{f.oldname} already installed, it's just not migrated
|
#{f.oldname} is already installed, it's just not migrated
|
||||||
You can migrate formula with `brew migrate #{f}`
|
You can migrate this formula with `brew migrate #{f}`
|
||||||
Or you can force install it with `brew install #{f} --force`
|
Or you can force install it with `brew install #{f} --force`
|
||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
|
@ -135,7 +135,7 @@ reset_on_interrupt() {
|
|||||||
exit 130
|
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
|
# renaming it in the currently checked-out branch. To test run
|
||||||
# "brew update --simulate-from-current-branch"
|
# "brew update --simulate-from-current-branch"
|
||||||
simulate_from_current_branch() {
|
simulate_from_current_branch() {
|
||||||
|
@ -815,7 +815,7 @@ module Homebrew
|
|||||||
bin_names.each do |name|
|
bin_names.each do |name|
|
||||||
["system", "shell_output", "pipe_output"].each do |cmd|
|
["system", "shell_output", "pipe_output"].each do |cmd|
|
||||||
if text =~ /test do.*#{cmd}[\(\s]+['"]#{Regexp.escape(name)}[\s'"]/m
|
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
|
end
|
||||||
end
|
end
|
||||||
|
@ -106,7 +106,7 @@ module Homebrew
|
|||||||
if guesses.count == 1
|
if guesses.count == 1
|
||||||
formula = guesses.shift
|
formula = guesses.shift
|
||||||
elsif guesses.count > 1
|
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
|
||||||
end
|
end
|
||||||
raise FormulaUnspecifiedError unless formula
|
raise FormulaUnspecifiedError unless formula
|
||||||
@ -308,8 +308,8 @@ module Homebrew
|
|||||||
ohai "git commit --no-edit --verbose --message='#{formula.name} " \
|
ohai "git commit --no-edit --verbose --message='#{formula.name} " \
|
||||||
"#{new_formula_version}#{devel_message}' -- #{formula.path}"
|
"#{new_formula_version}#{devel_message}' -- #{formula.path}"
|
||||||
ohai "git push --set-upstream $HUB_REMOTE #{branch}:#{branch}"
|
ohai "git push --set-upstream $HUB_REMOTE #{branch}:#{branch}"
|
||||||
ohai "create pull request with GitHub API"
|
|
||||||
ohai "git checkout --quiet -"
|
ohai "git checkout --quiet -"
|
||||||
|
ohai "create pull request with GitHub API"
|
||||||
else
|
else
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -208,7 +208,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
if changed_formulae_names.empty?
|
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
|
is_bumpable = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ module Homebrew
|
|||||||
|
|
||||||
ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp
|
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
|
# to use GPG to sign by default
|
||||||
ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test"
|
ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test"
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ module Homebrew
|
|||||||
class Checks
|
class Checks
|
||||||
############# HELPERS
|
############# HELPERS
|
||||||
# Finds files in `HOMEBREW_PREFIX` *and* /usr/local.
|
# Finds files in `HOMEBREW_PREFIX` *and* /usr/local.
|
||||||
# Specify paths relative to a prefix e.g. "include/foo.h".
|
# Specify paths relative to a prefix, e.g. "include/foo.h".
|
||||||
# Sets @found for your convenience.
|
# Sets @found for your convenience.
|
||||||
def find_relative_paths(*relative_paths)
|
def find_relative_paths(*relative_paths)
|
||||||
@found = [HOMEBREW_PREFIX, "/usr/local"].uniq.reduce([]) do |found, prefix|
|
@found = [HOMEBREW_PREFIX, "/usr/local"].uniq.reduce([]) do |found, prefix|
|
||||||
@ -158,7 +158,7 @@ module Homebrew
|
|||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Anaconda is known to frequently break Homebrew builds, including Vim and
|
Anaconda is known to frequently break Homebrew builds, including Vim and
|
||||||
MacVim, due to bundling many duplicates of system and Homebrew-available
|
MacVim, due to bundling many duplicates of system and Homebrew-provided
|
||||||
tools.
|
tools.
|
||||||
|
|
||||||
If you encounter a build failure please temporarily remove Anaconda
|
If you encounter a build failure please temporarily remove Anaconda
|
||||||
@ -414,7 +414,7 @@ module Homebrew
|
|||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Homebrew's bin was not found in your PATH.
|
Homebrew's bin was not found in your PATH.
|
||||||
Consider setting the PATH for example like so
|
Consider setting the PATH for example like so:
|
||||||
#{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/bin")}
|
#{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/bin")}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
@ -429,7 +429,7 @@ module Homebrew
|
|||||||
<<~EOS
|
<<~EOS
|
||||||
Homebrew's sbin was not found in your PATH but you have installed
|
Homebrew's sbin was not found in your PATH but you have installed
|
||||||
formulae that put executables in #{HOMEBREW_PREFIX}/sbin.
|
formulae that put executables in #{HOMEBREW_PREFIX}/sbin.
|
||||||
Consider setting the PATH for example like so
|
Consider setting the PATH for example like so:
|
||||||
#{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/sbin")}
|
#{Utils::Shell.prepend_path_in_profile("#{HOMEBREW_PREFIX}/sbin")}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
@ -463,11 +463,11 @@ module Homebrew
|
|||||||
inject_file_list scripts, <<~EOS
|
inject_file_list scripts, <<~EOS
|
||||||
"config" scripts exist outside your system or Homebrew directories.
|
"config" scripts exist outside your system or Homebrew directories.
|
||||||
`./configure` scripts often look for *-config scripts to determine if
|
`./configure` scripts often look for *-config scripts to determine if
|
||||||
software packages are installed, and what additional flags to use when
|
software packages are installed, and which additional flags to use when
|
||||||
compiling and linking.
|
compiling and linking.
|
||||||
|
|
||||||
Having additional scripts in your path can confuse software installed via
|
Having additional scripts in your path can confuse software installed via
|
||||||
Homebrew if the config script overrides a system or Homebrew provided
|
Homebrew if the config script overrides a system or Homebrew-provided
|
||||||
script of the same name. We found the following "config" scripts:
|
script of the same name. We found the following "config" scripts:
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
@ -508,7 +508,7 @@ module Homebrew
|
|||||||
(B) Symlink "bin/brew" into your prefix, but don't symlink "Cellar".
|
(B) Symlink "bin/brew" into your prefix, but don't symlink "Cellar".
|
||||||
|
|
||||||
Older installations of Homebrew may have created a symlinked Cellar, but this can
|
Older installations of Homebrew may have created a symlinked Cellar, but this can
|
||||||
cause problems when two formula install to locations that are mapped on top of each
|
cause problems when two formulae install to locations that are mapped on top of each
|
||||||
other during the linking step.
|
other during the linking step.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
@ -580,7 +580,7 @@ module Homebrew
|
|||||||
return if branch.nil? || branch =~ /master/
|
return if branch.nil? || branch =~ /master/
|
||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
#{CoreTap.instance.full_name} is not on the master branch
|
#{CoreTap.instance.full_name} is not on the master branch.
|
||||||
|
|
||||||
Check out the master branch by running:
|
Check out the master branch by running:
|
||||||
git -C "$(brew --repo homebrew/core)" checkout master
|
git -C "$(brew --repo homebrew/core)" checkout master
|
||||||
@ -625,7 +625,7 @@ module Homebrew
|
|||||||
return if frameworks_found.empty?
|
return if frameworks_found.empty?
|
||||||
|
|
||||||
inject_file_list frameworks_found, <<~EOS
|
inject_file_list frameworks_found, <<~EOS
|
||||||
Some frameworks can be picked up by CMake's build system and likely
|
Some frameworks can be picked up by CMake's build system and will likely
|
||||||
cause the build to fail. To compile CMake, you may wish to move these
|
cause the build to fail. To compile CMake, you may wish to move these
|
||||||
out of the way:
|
out of the way:
|
||||||
EOS
|
EOS
|
||||||
@ -666,7 +666,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
You have uncommitted modifications to Homebrew
|
You have uncommitted modifications to Homebrew.
|
||||||
If this is a surprise to you, then you should stash these modifications.
|
If this is a surprise to you, then you should stash these modifications.
|
||||||
Stashing returns Homebrew to a pristine state but can be undone
|
Stashing returns Homebrew to a pristine state but can be undone
|
||||||
should you later need to do so for some reason.
|
should you later need to do so for some reason.
|
||||||
@ -749,7 +749,7 @@ module Homebrew
|
|||||||
return if unlinked.empty?
|
return if unlinked.empty?
|
||||||
|
|
||||||
inject_file_list unlinked, <<~EOS
|
inject_file_list unlinked, <<~EOS
|
||||||
You have unlinked kegs in your Cellar
|
You have unlinked kegs in your Cellar.
|
||||||
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
|
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
|
||||||
those kegs to fail to run properly once built. Run `brew link` on these:
|
those kegs to fail to run properly once built. Run `brew link` on these:
|
||||||
EOS
|
EOS
|
||||||
@ -775,7 +775,7 @@ module Homebrew
|
|||||||
message = "You have external commands with conflicting names.\n"
|
message = "You have external commands with conflicting names.\n"
|
||||||
cmd_map.each do |cmd_name, cmd_paths|
|
cmd_map.each do |cmd_name, cmd_paths|
|
||||||
message += inject_file_list cmd_paths, <<~EOS
|
message += inject_file_list cmd_paths, <<~EOS
|
||||||
Found command `#{cmd_name}` in following places:
|
Found command `#{cmd_name}` in the following places:
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -801,7 +801,7 @@ module Homebrew
|
|||||||
|
|
||||||
bad_tap_files.keys.map do |tap|
|
bad_tap_files.keys.map do |tap|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Found Ruby file outside #{tap} tap formula directory
|
Found Ruby file outside #{tap} tap formula directory.
|
||||||
(#{tap.formula_dir}):
|
(#{tap.formula_dir}):
|
||||||
#{bad_tap_files[tap].join("\n ")}
|
#{bad_tap_files[tap].join("\n ")}
|
||||||
EOS
|
EOS
|
||||||
|
@ -189,7 +189,7 @@ class TapFormulaAmbiguityError < RuntimeError
|
|||||||
super <<~EOS
|
super <<~EOS
|
||||||
Formulae found in multiple taps: #{formulae.map { |f| "\n * #{f}" }.join}
|
Formulae found in multiple taps: #{formulae.map { |f| "\n * #{f}" }.join}
|
||||||
|
|
||||||
Please use the fully-qualified name e.g. #{formulae.first} to refer the formula.
|
Please use the fully-qualified name (e.g. #{formulae.first}) to refer to the formula.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -209,7 +209,7 @@ class TapFormulaWithOldnameAmbiguityError < RuntimeError
|
|||||||
super <<~EOS
|
super <<~EOS
|
||||||
Formulae with '#{name}' old name found in multiple taps: #{taps.map { |t| "\n * #{t}" }.join}
|
Formulae with '#{name}' old name found in multiple taps: #{taps.map { |t| "\n * #{t}" }.join}
|
||||||
|
|
||||||
Please use the fully-qualified name e.g. #{taps.first}/#{name} to refer the formula or use its new name.
|
Please use the fully-qualified name (e.g. #{taps.first}/#{name}) to refer to the formula or use its new name.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -333,7 +333,7 @@ class FormulaConflictError < RuntimeError
|
|||||||
|
|
||||||
Unlinking removes a formula's symlinks from #{HOMEBREW_PREFIX}. You can
|
Unlinking removes a formula's symlinks from #{HOMEBREW_PREFIX}. You can
|
||||||
link the formula again after the install finishes. You can --force this
|
link the formula again after the install finishes. You can --force this
|
||||||
install, but the build may fail or cause obscure side-effects in the
|
install, but the build may fail or cause obscure side effects in the
|
||||||
resulting software.
|
resulting software.
|
||||||
EOS
|
EOS
|
||||||
message.join("\n")
|
message.join("\n")
|
||||||
|
@ -251,9 +251,9 @@ module SharedEnvExtension
|
|||||||
|
|
||||||
else
|
else
|
||||||
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
|
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
|
||||||
ohai "Using Homebrew-provided fortran compiler."
|
ohai "Using Homebrew-provided Fortran compiler."
|
||||||
elsif (gfortran = which("gfortran", PATH.new(ORIGINAL_PATHS)))
|
elsif (gfortran = which("gfortran", PATH.new(ORIGINAL_PATHS)))
|
||||||
ohai "Using a fortran compiler found at #{gfortran}."
|
ohai "Using a Fortran compiler found at #{gfortran}."
|
||||||
end
|
end
|
||||||
if gfortran
|
if gfortran
|
||||||
puts "This may be changed by setting the FC environment variable."
|
puts "This may be changed by setting the FC environment variable."
|
||||||
|
@ -63,8 +63,8 @@ module Homebrew
|
|||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
umask is currently set to 000. Directories created by Homebrew cannot
|
umask is currently set to 000. Directories created by Homebrew cannot
|
||||||
be world-writable. This issue can be resolved by adding umask 002 to
|
be world-writable. This issue can be resolved by adding "umask 002" to
|
||||||
your #{shell_profile}
|
your #{shell_profile}:
|
||||||
echo 'umask 002' >> #{shell_profile}
|
echo 'umask 002' >> #{shell_profile}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
@ -50,7 +50,7 @@ class DevelopmentTools
|
|||||||
|
|
||||||
def custom_installation_instructions
|
def custom_installation_instructions
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Install GNU's GCC
|
Install GNU's GCC:
|
||||||
brew install gcc
|
brew install gcc
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
@ -202,7 +202,7 @@ module Homebrew
|
|||||||
<<~EOS
|
<<~EOS
|
||||||
Your XQuartz (#{MacOS::XQuartz.version}) is outdated.
|
Your XQuartz (#{MacOS::XQuartz.version}) is outdated.
|
||||||
Please install XQuartz #{MacOS::XQuartz.latest_version} (or delete the current version).
|
Please install XQuartz #{MacOS::XQuartz.latest_version} (or delete the current version).
|
||||||
XQuartz can be updated using Homebrew Cask by running
|
XQuartz can be updated using Homebrew Cask by running:
|
||||||
brew cask reinstall xquartz
|
brew cask reinstall xquartz
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
@ -338,7 +338,7 @@ module Homebrew
|
|||||||
macOS won't move relative symlinks across volumes unless the target file already
|
macOS won't move relative symlinks across volumes unless the target file already
|
||||||
exists. Brews known to be affected by this are Git and Narwhal.
|
exists. Brews known to be affected by this are Git and Narwhal.
|
||||||
|
|
||||||
You should set the "HOMEBREW_TEMP" environmental variable to a suitable
|
You should set the "HOMEBREW_TEMP" environment variable to a suitable
|
||||||
directory on the same volume as your Cellar.
|
directory on the same volume as your Cellar.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
@ -14,7 +14,7 @@ module FormulaCellarChecks
|
|||||||
|
|
||||||
<<~EOS
|
<<~EOS
|
||||||
#{prefix_bin} is not in your PATH
|
#{prefix_bin} is not in your PATH
|
||||||
You can amend this by altering your #{Utils::Shell.profile} file
|
You can amend this by altering your #{Utils::Shell.profile} file.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ module FormulaCellarChecks
|
|||||||
easy-install.pth files were found
|
easy-install.pth files were found
|
||||||
These .pth files are likely to cause link conflicts. Please invoke
|
These .pth files are likely to cause link conflicts. Please invoke
|
||||||
setup.py using Language::Python.setup_install_args.
|
setup.py using Language::Python.setup_install_args.
|
||||||
The offending files are
|
The offending files are:
|
||||||
#{pth_found * "\n "}
|
#{pth_found * "\n "}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
@ -225,14 +225,14 @@ class FormulaInstaller
|
|||||||
EOS
|
EOS
|
||||||
if formula.outdated? && !formula.head?
|
if formula.outdated? && !formula.head?
|
||||||
message += <<~EOS
|
message += <<~EOS
|
||||||
To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.name}`
|
To upgrade to #{formula.pkg_version}, run `brew upgrade #{formula.name}`.
|
||||||
EOS
|
EOS
|
||||||
elsif only_deps?
|
elsif only_deps?
|
||||||
message = nil
|
message = nil
|
||||||
else
|
else
|
||||||
# some other version is already installed *and* linked
|
# some other version is already installed *and* linked
|
||||||
message += <<~EOS
|
message += <<~EOS
|
||||||
To install #{formula.pkg_version}, first run `brew unlink #{formula.name}`
|
To install #{formula.pkg_version}, first run `brew unlink #{formula.name}`.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
raise CannotInstallFormulaError, message if message
|
raise CannotInstallFormulaError, message if message
|
||||||
@ -875,7 +875,7 @@ class FormulaInstaller
|
|||||||
rescue Exception => e # rubocop:disable Lint/RescueException
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
||||||
onoe "Failed to fix install linkage"
|
onoe "Failed to fix install linkage"
|
||||||
puts "The formula built, but you may encounter issues using it or linking other"
|
puts "The formula built, but you may encounter issues using it or linking other"
|
||||||
puts "formula against it."
|
puts "formulae against it."
|
||||||
ohai e, e.backtrace if debug?
|
ohai e, e.backtrace if debug?
|
||||||
Homebrew.failed = true
|
Homebrew.failed = true
|
||||||
@show_summary_heading = true
|
@show_summary_heading = true
|
||||||
|
@ -171,7 +171,7 @@ module Language
|
|||||||
# @param formula [Formula] the active Formula
|
# @param formula [Formula] the active Formula
|
||||||
# @param venv_root [Pathname, String] the path to the root of the
|
# @param venv_root [Pathname, String] the path to the root of the
|
||||||
# virtualenv
|
# virtualenv
|
||||||
# @param python [String] which interpreter to use; i.e. "python" or
|
# @param python [String] which interpreter to use, i.e. "python" or
|
||||||
# "python2"
|
# "python2"
|
||||||
def initialize(formula, venv_root, python)
|
def initialize(formula, venv_root, python)
|
||||||
@formula = formula
|
@formula = formula
|
||||||
|
@ -27,9 +27,9 @@ class Migrator
|
|||||||
class MigratorDifferentTapsError < RuntimeError
|
class MigratorDifferentTapsError < RuntimeError
|
||||||
def initialize(formula, tap)
|
def initialize(formula, tap)
|
||||||
msg = if tap.core_tap?
|
msg = if tap.core_tap?
|
||||||
"Please try to use #{formula.oldname} to refer the formula.\n"
|
"Please try to use #{formula.oldname} to refer to the formula.\n"
|
||||||
elsif tap
|
elsif tap
|
||||||
"Please try to use fully-qualified #{tap}/#{formula.oldname} to refer the formula.\n"
|
"Please try to use fully-qualified #{tap}/#{formula.oldname} to refer to the formula.\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
super <<~EOS
|
super <<~EOS
|
||||||
|
@ -132,7 +132,7 @@ class Resource
|
|||||||
rescue ChecksumMissingError
|
rescue ChecksumMissingError
|
||||||
opoo "Cannot verify integrity of #{fn.basename}"
|
opoo "Cannot verify integrity of #{fn.basename}"
|
||||||
puts "A checksum was not provided for this resource"
|
puts "A checksum was not provided for this resource"
|
||||||
puts "For your reference the SHA256 is: #{fn.sha256}"
|
puts "For your reference the SHA-256 is: #{fn.sha256}"
|
||||||
end
|
end
|
||||||
|
|
||||||
Checksum::TYPES.each do |type|
|
Checksum::TYPES.each do |type|
|
||||||
|
@ -7,9 +7,9 @@ module RuboCop
|
|||||||
def audit_formula(_node, _class_node, _parent_class_node, body_node)
|
def audit_formula(_node, _class_node, _parent_class_node, body_node)
|
||||||
return if body_node.nil?
|
return if body_node.nil?
|
||||||
|
|
||||||
problem "MD5 checksums are deprecated, please use SHA256" if method_called_ever?(body_node, :md5)
|
problem "MD5 checksums are deprecated, please use SHA-256" if method_called_ever?(body_node, :md5)
|
||||||
|
|
||||||
problem "SHA1 checksums are deprecated, please use SHA256" if method_called_ever?(body_node, :sha1)
|
problem "SHA1 checksums are deprecated, please use SHA-256" if method_called_ever?(body_node, :sha1)
|
||||||
|
|
||||||
sha256_calls = find_every_method_call_by_name(body_node, :sha256)
|
sha256_calls = find_every_method_call_by_name(body_node, :sha256)
|
||||||
sha256_calls.each do |sha256_call|
|
sha256_calls.each do |sha256_call|
|
||||||
|
@ -542,7 +542,7 @@ module RuboCop
|
|||||||
def file_path_allowed?
|
def file_path_allowed?
|
||||||
paths_to_exclude = [%r{/Library/Homebrew/compat/},
|
paths_to_exclude = [%r{/Library/Homebrew/compat/},
|
||||||
%r{/Library/Homebrew/test/}]
|
%r{/Library/Homebrew/test/}]
|
||||||
return true if @file_path.nil? # file_path is nil when source is directly passed to the cop eg., in specs
|
return true if @file_path.nil? # file_path is nil when source is directly passed to the cop, e.g. in specs
|
||||||
|
|
||||||
@file_path !~ Regexp.union(paths_to_exclude)
|
@file_path !~ Regexp.union(paths_to_exclude)
|
||||||
end
|
end
|
||||||
|
@ -78,7 +78,7 @@ module RuboCop
|
|||||||
|
|
||||||
# Check if a/an are used in a formula's desc
|
# Check if a/an are used in a formula's desc
|
||||||
if match = regex_match_group(desc, /^(an?)\s/i)
|
if match = regex_match_group(desc, /^(an?)\s/i)
|
||||||
problem "Description shouldn't start with an indefinite article i.e. \"#{match.to_s.strip}\""
|
problem "Description shouldn't start with an indefinite article, i.e. \"#{match.to_s.strip}\""
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check if invalid uppercase words are at the start of a
|
# Check if invalid uppercase words are at the start of a
|
||||||
|
@ -15,7 +15,7 @@ describe Cask::Artifact::Installer, :cask do
|
|||||||
it "shows a message prompting to run the installer manually" do
|
it "shows a message prompting to run the installer manually" do
|
||||||
expect {
|
expect {
|
||||||
installer.install_phase(command: command)
|
installer.install_phase(command: command)
|
||||||
}.to output(%r{run the installer at\s+'#{staged_path}/installer'}).to_stdout
|
}.to output(%r{run the installer at:\s+'#{staged_path}/installer'}).to_stdout
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ describe Cask::Cmd::Info, :cask do
|
|||||||
|
|
||||||
Custom text via puts followed by DSL-generated text:
|
Custom text via puts followed by DSL-generated text:
|
||||||
To use with-caveats, you may need to add the /custom/path/bin directory
|
To use with-caveats, you may need to add the /custom/path/bin directory
|
||||||
to your PATH environment variable, eg (for bash shell):
|
to your PATH environment variable, e.g. (for bash shell):
|
||||||
|
|
||||||
export PATH=/custom/path/bin:"$PATH"
|
export PATH=/custom/path/bin:"$PATH"
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ describe Cask::Installer, :cask do
|
|||||||
==> Verifying SHA-256 checksum for Cask 'with-installer-manual'.
|
==> Verifying SHA-256 checksum for Cask 'with-installer-manual'.
|
||||||
==> Installing Cask with-installer-manual
|
==> Installing Cask with-installer-manual
|
||||||
To complete the installation of Cask with-installer-manual, you must also
|
To complete the installation of Cask with-installer-manual, you must also
|
||||||
run the installer at
|
run the installer at:
|
||||||
|
|
||||||
'#{with_installer_manual.staged_path.join("Caffeine.app")}'
|
'#{with_installer_manual.staged_path.join("Caffeine.app")}'
|
||||||
🍺 with-installer-manual was successfully installed!
|
🍺 with-installer-manual was successfully installed!
|
||||||
|
@ -66,7 +66,7 @@ describe RuboCop::Cop::FormulaAuditStrict::Desc do
|
|||||||
class Foo < Formula
|
class Foo < Formula
|
||||||
url 'https://brew.sh/foo-1.0.tgz'
|
url 'https://brew.sh/foo-1.0.tgz'
|
||||||
desc 'An aardvark'
|
desc 'An aardvark'
|
||||||
^^^ Description shouldn\'t start with an indefinite article i.e. \"An\"
|
^^^ Description shouldn\'t start with an indefinite article, i.e. \"An\"
|
||||||
end
|
end
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
@ -115,7 +115,7 @@ module UnpackStrategy
|
|||||||
|
|
||||||
def extract_to_dir(unpack_dir, basename:, verbose:)
|
def extract_to_dir(unpack_dir, basename:, verbose:)
|
||||||
mount(verbose: verbose) do |mounts|
|
mount(verbose: verbose) do |mounts|
|
||||||
raise "No mounts found in '#{path}'; perhaps it is a bad disk image?" if mounts.empty?
|
raise "No mounts found in '#{path}'; perhaps this is a bad disk image?" if mounts.empty?
|
||||||
|
|
||||||
mounts.each do |mount|
|
mounts.each do |mount|
|
||||||
mount.extract(to: unpack_dir, verbose: verbose)
|
mount.extract(to: unpack_dir, verbose: verbose)
|
||||||
|
@ -54,7 +54,7 @@ module Homebrew
|
|||||||
setup_gem_environment! if setup_gem_environment
|
setup_gem_environment! if setup_gem_environment
|
||||||
return unless Gem::Specification.find_all_by_name(name, version).empty?
|
return unless Gem::Specification.find_all_by_name(name, version).empty?
|
||||||
|
|
||||||
# Shell out to `gem` to avoid RubyGems requires e.g. loading JSON.
|
# Shell out to `gem` to avoid RubyGems requires for e.g. loading JSON.
|
||||||
ohai_if_defined "Installing '#{name}' gem"
|
ohai_if_defined "Installing '#{name}' gem"
|
||||||
install_args = %W[--no-document #{name}]
|
install_args = %W[--no-document #{name}]
|
||||||
install_args << "--version" << version if version
|
install_args << "--version" << version if version
|
||||||
|
@ -142,7 +142,7 @@ module GitHub
|
|||||||
when :environment
|
when :environment
|
||||||
onoe <<~EOS
|
onoe <<~EOS
|
||||||
Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!
|
Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!
|
||||||
Scopes they need: #{needed_human_scopes}
|
Scopes it needs: #{needed_human_scopes}
|
||||||
Scopes it has: #{credentials_scopes}
|
Scopes it has: #{credentials_scopes}
|
||||||
Create a new personal access token:
|
Create a new personal access token:
|
||||||
#{ALL_SCOPES_URL}
|
#{ALL_SCOPES_URL}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user