whitespace fixes
This commit is contained in:
parent
15c38a2d8b
commit
89f0fcedbe
@ -100,12 +100,12 @@ then
|
|||||||
# Refuse to run on pre-Mavericks
|
# Refuse to run on pre-Mavericks
|
||||||
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]]
|
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100900" ]]
|
||||||
then
|
then
|
||||||
printf "ERROR: Your version of macOS (%s) is too old to run Homebrew!" "$HOMEBREW_MACOS_VERSION" >&2
|
printf "ERROR: Your version of macOS (%s) is too old to run Homebrew!\\n" "$HOMEBREW_MACOS_VERSION" >&2
|
||||||
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100700" ]]
|
if [[ "$HOMEBREW_MACOS_VERSION_NUMERIC" -lt "100700" ]]
|
||||||
then
|
then
|
||||||
printf " For 10.4 - 10.6 support see: https://github.com/mistydemeo/tigerbrew\n" >&2
|
printf " For 10.4 - 10.6 support see: https://github.com/mistydemeo/tigerbrew\\n" >&2
|
||||||
fi
|
fi
|
||||||
printf "\n" >&2
|
printf "\\n" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The system Curl is too old for some modern HTTPS certificates on
|
# The system Curl is too old for some modern HTTPS certificates on
|
||||||
|
|||||||
@ -52,7 +52,7 @@ module Cask
|
|||||||
|
|
||||||
ALT_NAME_ATTRIBUTE = "com.apple.metadata:kMDItemAlternateNames".freeze
|
ALT_NAME_ATTRIBUTE = "com.apple.metadata:kMDItemAlternateNames".freeze
|
||||||
|
|
||||||
# Try to make the asset searchable under the target name. Spotlight
|
# Try to make the asset searchable under the target name. Spotlight
|
||||||
# respects this attribute for many filetypes, but ignores it for App
|
# respects this attribute for many filetypes, but ignores it for App
|
||||||
# bundles. Alfred 2.2 respects it even for App bundles.
|
# bundles. Alfred 2.2 respects it even for App bundles.
|
||||||
def add_altname_metadata(file, altname, command: nil)
|
def add_altname_metadata(file, altname, command: nil)
|
||||||
|
|||||||
@ -133,8 +133,8 @@ module Cask
|
|||||||
Checksum for Cask '#{token}' does not match.
|
Checksum for Cask '#{token}' does not match.
|
||||||
|
|
||||||
Expected: #{Formatter.success(expected.to_s)}
|
Expected: #{Formatter.success(expected.to_s)}
|
||||||
Actual: #{Formatter.error(actual.to_s)}
|
Actual: #{Formatter.error(actual.to_s)}
|
||||||
File: #{path}
|
File: #{path}
|
||||||
|
|
||||||
To retry an incomplete download, remove the file above. If the issue persists, visit:
|
To retry an incomplete download, remove the file above. If the issue persists, visit:
|
||||||
|
|
||||||
|
|||||||
@ -49,8 +49,8 @@ module Homebrew
|
|||||||
unless f.core_formula?
|
unless f.core_formula?
|
||||||
tap = <<~EOS
|
tap = <<~EOS
|
||||||
Formula: #{f.name}
|
Formula: #{f.name}
|
||||||
Tap: #{f.tap}
|
Tap: #{f.tap}
|
||||||
Path: #{f.path}
|
Path: #{f.path}
|
||||||
EOS
|
EOS
|
||||||
files["00.tap.out"] = { content: tap }
|
files["00.tap.out"] = { content: tap }
|
||||||
end
|
end
|
||||||
|
|||||||
@ -152,8 +152,8 @@ EOSCRIPT
|
|||||||
odie <<EOS
|
odie <<EOS
|
||||||
Checksum mismatch.
|
Checksum mismatch.
|
||||||
Expected: $VENDOR_SHA
|
Expected: $VENDOR_SHA
|
||||||
Actual: $sha
|
Actual: $sha
|
||||||
Archive: $CACHED_LOCATION
|
Archive: $CACHED_LOCATION
|
||||||
To retry an incomplete download, remove the file above.
|
To retry an incomplete download, remove the file above.
|
||||||
EOS
|
EOS
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -70,7 +70,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
puts "Start commit: #{start_commit}"
|
puts "Start commit: #{start_commit}"
|
||||||
puts "End commit: #{end_commit}"
|
puts " End commit: #{end_commit}"
|
||||||
|
|
||||||
mkdir "update-test"
|
mkdir "update-test"
|
||||||
chdir "update-test" do
|
chdir "update-test" do
|
||||||
|
|||||||
@ -403,12 +403,12 @@ class BuildError < RuntimeError
|
|||||||
elsif issues_url = formula.tap.issues_url
|
elsif issues_url = formula.tap.issues_url
|
||||||
puts <<~EOS
|
puts <<~EOS
|
||||||
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
|
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
|
||||||
#{Formatter.url(issues_url)}
|
#{Formatter.url(issues_url)}
|
||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
puts <<~EOS
|
puts <<~EOS
|
||||||
If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
|
If reporting this issue please do so to (not Homebrew/brew or Homebrew/core):
|
||||||
#{formula.tap}
|
#{formula.tap}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -568,8 +568,8 @@ class ChecksumMismatchError < RuntimeError
|
|||||||
super <<~EOS
|
super <<~EOS
|
||||||
#{@hash_type} mismatch
|
#{@hash_type} mismatch
|
||||||
Expected: #{expected}
|
Expected: #{expected}
|
||||||
Actual: #{actual}
|
Actual: #{actual}
|
||||||
Archive: #{fn}
|
Archive: #{fn}
|
||||||
To retry an incomplete download, remove the file above.
|
To retry an incomplete download, remove the file above.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|||||||
@ -135,7 +135,7 @@ module Stdenv
|
|||||||
return if compiler_any_clang?
|
return if compiler_any_clang?
|
||||||
return unless Hardware.is_32_bit?
|
return unless Hardware.is_32_bit?
|
||||||
|
|
||||||
# Can't mix "-march" for a 32-bit CPU with "-arch x86_64"
|
# Can't mix "-march" for a 32-bit CPU with "-arch x86_64"
|
||||||
replace_in_cflags(/-march=\S*/, "-Xarch_#{Hardware::CPU.arch_32_bit} \\0")
|
replace_in_cflags(/-march=\S*/, "-Xarch_#{Hardware::CPU.arch_32_bit} \\0")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ module DiskUsageExtension
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Homebrew extends Ruby's `Pathname` to make our code more readable.
|
# Homebrew extends Ruby's `Pathname` to make our code more readable.
|
||||||
# @see https://ruby-doc.org/stdlib-1.8.7/libdoc/pathname/rdoc/Pathname.html Ruby's Pathname API
|
# @see https://ruby-doc.org/stdlib-1.8.7/libdoc/pathname/rdoc/Pathname.html Ruby's Pathname API
|
||||||
class Pathname
|
class Pathname
|
||||||
include DiskUsageExtension
|
include DiskUsageExtension
|
||||||
|
|
||||||
|
|||||||
@ -140,7 +140,7 @@ module FormulaCellarChecks
|
|||||||
<<~EOS
|
<<~EOS
|
||||||
Emacs Lisp files were installed into the wrong site-lisp subdirectory.
|
Emacs Lisp files were installed into the wrong site-lisp subdirectory.
|
||||||
They should be installed into:
|
They should be installed into:
|
||||||
#{share}/emacs/site-lisp/#{name}
|
#{share}/emacs/site-lisp/#{name}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ module FormulaCellarChecks
|
|||||||
Emacs Lisp files were linked directly to #{HOMEBREW_PREFIX}/share/emacs/site-lisp
|
Emacs Lisp files were linked directly to #{HOMEBREW_PREFIX}/share/emacs/site-lisp
|
||||||
This may cause conflicts with other packages.
|
This may cause conflicts with other packages.
|
||||||
They should instead be installed into:
|
They should instead be installed into:
|
||||||
#{share}/emacs/site-lisp/#{name}
|
#{share}/emacs/site-lisp/#{name}
|
||||||
|
|
||||||
The offending files are:
|
The offending files are:
|
||||||
#{elisps * "\n "}
|
#{elisps * "\n "}
|
||||||
|
|||||||
@ -12,7 +12,8 @@ module Homebrew
|
|||||||
when :ppc
|
when :ppc
|
||||||
abort <<~EOS
|
abort <<~EOS
|
||||||
Sorry, Homebrew does not support your computer's CPU architecture.
|
Sorry, Homebrew does not support your computer's CPU architecture.
|
||||||
For PPC support, see: https://github.com/mistydemeo/tigerbrew
|
For PPC support, see:
|
||||||
|
#{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class Migrator
|
|||||||
|
|
||||||
super <<~EOS
|
super <<~EOS
|
||||||
#{formula.name} from #{formula.tap} is given, but old name #{formula.oldname} was installed from #{tap || "path or url"}.
|
#{formula.name} from #{formula.tap} is given, but old name #{formula.oldname} was installed from #{tap || "path or url"}.
|
||||||
#{msg}To force migrate use `brew migrate --force #{formula.oldname}`.
|
#{msg}To force migration use `brew migrate --force #{formula.oldname}`.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -36,14 +36,14 @@ class Requirement
|
|||||||
if cask
|
if cask
|
||||||
s += <<~EOS
|
s += <<~EOS
|
||||||
You can install with Homebrew Cask:
|
You can install with Homebrew Cask:
|
||||||
brew cask install #{cask}
|
brew cask install #{cask}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
if download
|
if download
|
||||||
s += <<~EOS
|
s += <<~EOS
|
||||||
You can download from:
|
You can download from:
|
||||||
#{download}
|
#{download}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
s
|
s
|
||||||
|
|||||||
@ -117,8 +117,8 @@ module RuboCop
|
|||||||
|
|
||||||
# Returns array of function call nodes matching func_name in every descendant of node.
|
# Returns array of function call nodes matching func_name in every descendant of node.
|
||||||
#
|
#
|
||||||
# - matches function call: `foo(*args, **kwargs)`
|
# - matches function call: `foo(*args, **kwargs)`
|
||||||
# - does not match method calls: `foo.bar(*args, **kwargs)`
|
# - does not match method calls: `foo.bar(*args, **kwargs)`
|
||||||
# - returns every function calls if no func_name is passed
|
# - returns every function calls if no func_name is passed
|
||||||
def find_every_func_call_by_name(node, func_name = nil)
|
def find_every_func_call_by_name(node, func_name = nil)
|
||||||
return if node.nil?
|
return if node.nil?
|
||||||
|
|||||||
@ -44,7 +44,7 @@ module RuboCop
|
|||||||
if patch_url !~ /[a-fA-F0-9]{40}/
|
if patch_url !~ /[a-fA-F0-9]{40}/
|
||||||
problem <<~EOS.chomp
|
problem <<~EOS.chomp
|
||||||
GitHub/Gist patches should specify a revision:
|
GitHub/Gist patches should specify a revision:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -63,14 +63,14 @@ module RuboCop
|
|||||||
if regex_match_group(patch, %r{macports/trunk})
|
if regex_match_group(patch, %r{macports/trunk})
|
||||||
problem <<~EOS.chomp
|
problem <<~EOS.chomp
|
||||||
MacPorts patches should specify a revision instead of trunk:
|
MacPorts patches should specify a revision instead of trunk:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
if regex_match_group(patch, %r{^http://trac\.macports\.org})
|
if regex_match_group(patch, %r{^http://trac\.macports\.org})
|
||||||
problem <<~EOS.chomp
|
problem <<~EOS.chomp
|
||||||
Patches from MacPorts Trac should be https://, not http:
|
Patches from MacPorts Trac should be https://, not http:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ module RuboCop
|
|||||||
|
|
||||||
problem <<~EOS.chomp
|
problem <<~EOS.chomp
|
||||||
Patches from Debian should be https://, not http:
|
Patches from Debian should be https://, not http:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -63,7 +63,7 @@ describe Options do
|
|||||||
expect(subject.count).to eq(1)
|
expect(subject.count).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "preserves existing member when adding a duplicate" do
|
it "preserves existing member when adding a duplicate" do
|
||||||
a = Option.new("foo", "bar")
|
a = Option.new("foo", "bar")
|
||||||
b = Option.new("foo", "qux")
|
b = Option.new("foo", "qux")
|
||||||
subject << a << b
|
subject << a << b
|
||||||
|
|||||||
@ -50,7 +50,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
GitHub/Gist patches should specify a revision:
|
GitHub/Gist patches should specify a revision:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -60,7 +60,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
MacPorts patches should specify a revision instead of trunk:
|
MacPorts patches should specify a revision instead of trunk:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -70,7 +70,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
Patches from MacPorts Trac should be https://, not http:
|
Patches from MacPorts Trac should be https://, not http:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -80,7 +80,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
Patches from Debian should be https://, not http:
|
Patches from Debian should be https://, not http:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -141,7 +141,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
{ message:
|
{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
Patches from MacPorts Trac should be https://, not http:
|
Patches from MacPorts Trac should be https://, not http:
|
||||||
http://trac.macports.org/export/68507/trunk/dports/net/trafshow/files/
|
http://trac.macports.org/export/68507/trunk/dports/net/trafshow/files/
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 8,
|
line: 8,
|
||||||
@ -185,7 +185,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
GitHub/Gist patches should specify a revision:
|
GitHub/Gist patches should specify a revision:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -195,7 +195,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
MacPorts patches should specify a revision instead of trunk:
|
MacPorts patches should specify a revision instead of trunk:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -205,7 +205,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
Patches from MacPorts Trac should be https://, not http:
|
Patches from MacPorts Trac should be https://, not http:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
@ -215,7 +215,7 @@ describe RuboCop::Cop::FormulaAudit::Patches do
|
|||||||
[{ message:
|
[{ message:
|
||||||
<<~EOS.chomp,
|
<<~EOS.chomp,
|
||||||
Patches from Debian should be https://, not http:
|
Patches from Debian should be https://, not http:
|
||||||
#{patch_url}
|
#{patch_url}
|
||||||
EOS
|
EOS
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
|
|||||||
@ -71,7 +71,7 @@ module Homebrew
|
|||||||
|
|
||||||
odie_if_defined <<~EOS
|
odie_if_defined <<~EOS
|
||||||
the '#{name}' gem is installed but couldn't find '#{executable}' in the PATH:
|
the '#{name}' gem is installed but couldn't find '#{executable}' in the PATH:
|
||||||
#{ENV["PATH"]}
|
#{ENV["PATH"]}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ module GitHub
|
|||||||
if ENV["HOMEBREW_GITHUB_API_TOKEN"]
|
if ENV["HOMEBREW_GITHUB_API_TOKEN"]
|
||||||
message << <<~EOS
|
message << <<~EOS
|
||||||
HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check:
|
HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check:
|
||||||
#{Formatter.url("https://github.com/settings/tokens")}
|
#{Formatter.url("https://github.com/settings/tokens")}
|
||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
message << <<~EOS
|
message << <<~EOS
|
||||||
@ -143,7 +143,7 @@ module GitHub
|
|||||||
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 it needs: #{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}
|
||||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user