Merge pull request #6801 from EricFromCanada/output-formatting
Update formatting of status messages
This commit is contained in:
commit
adc630f1ca
@ -127,7 +127,7 @@ class Build
|
|||||||
end
|
end
|
||||||
if ARGV.interactive?
|
if ARGV.interactive?
|
||||||
ohai "Entering interactive mode"
|
ohai "Entering interactive mode"
|
||||||
puts "Type `exit` to return and finalize the installation"
|
puts "Type `exit` to return and finalize the installation."
|
||||||
puts "Install to this prefix: #{formula.prefix}"
|
puts "Install to this prefix: #{formula.prefix}"
|
||||||
|
|
||||||
if ARGV.git?
|
if ARGV.git?
|
||||||
|
|||||||
@ -111,7 +111,7 @@ class Cleaner
|
|||||||
end
|
end
|
||||||
if ARGV.debug?
|
if ARGV.debug?
|
||||||
old_perms = path.stat.mode & 0777
|
old_perms = path.stat.mode & 0777
|
||||||
puts "Fixing #{path} permissions from #{old_perms.to_s(8)} to #{perms.to_s(8)}" if perms != old_perms
|
odebug "Fixing #{path} permissions from #{old_perms.to_s(8)} to #{perms.to_s(8)}" if perms != old_perms
|
||||||
end
|
end
|
||||||
path.chmod perms
|
path.chmod perms
|
||||||
end
|
end
|
||||||
|
|||||||
@ -35,21 +35,18 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Find commands in Homebrew/cmd
|
# Find commands in Homebrew/cmd
|
||||||
puts "Built-in commands"
|
ohai "Built-in commands", Formatter.columns(internal_commands.sort)
|
||||||
puts Formatter.columns(internal_commands.sort)
|
|
||||||
|
|
||||||
# Find commands in Homebrew/dev-cmd
|
# Find commands in Homebrew/dev-cmd
|
||||||
puts
|
puts
|
||||||
puts "Built-in developer commands"
|
ohai "Built-in developer commands", Formatter.columns(internal_developer_commands.sort)
|
||||||
puts Formatter.columns(internal_developer_commands.sort)
|
|
||||||
|
|
||||||
exts = external_commands
|
exts = external_commands
|
||||||
return if exts.empty?
|
return if exts.empty?
|
||||||
|
|
||||||
# Find commands in the PATH
|
# Find commands in the PATH
|
||||||
puts
|
puts
|
||||||
puts "External commands"
|
ohai "External commands", Formatter.columns(exts)
|
||||||
puts Formatter.columns(exts)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def internal_commands
|
def internal_commands
|
||||||
|
|||||||
@ -50,7 +50,7 @@ module Homebrew
|
|||||||
|
|
||||||
first_warning = true
|
first_warning = true
|
||||||
methods.each do |method|
|
methods.each do |method|
|
||||||
$stderr.puts "Checking #{method}" if args.debug?
|
$stderr.puts Formatter.headline("Checking #{method}", color: :magenta) if args.debug?
|
||||||
unless checks.respond_to?(method)
|
unless checks.respond_to?(method)
|
||||||
Homebrew.failed = true
|
Homebrew.failed = true
|
||||||
puts "No check available by the name: #{method}"
|
puts "No check available by the name: #{method}"
|
||||||
|
|||||||
@ -172,7 +172,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
if text_matches.size > MAXIMUM_STRING_MATCHES
|
if text_matches.size > MAXIMUM_STRING_MATCHES
|
||||||
puts "Only the first #{MAXIMUM_STRING_MATCHES} matches were output"
|
puts "Only the first #{MAXIMUM_STRING_MATCHES} matches were output."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ module Homebrew
|
|||||||
|
|
||||||
fc.generate!
|
fc.generate!
|
||||||
|
|
||||||
puts "Please `brew audit --new-formula #{fc.name}` before submitting, thanks."
|
puts "Please run `brew audit --new-formula #{fc.name}` before submitting, thanks."
|
||||||
exec_editor fc.path
|
exec_editor fc.path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -135,14 +135,14 @@ module Homebrew
|
|||||||
file = repo/path
|
file = repo/path
|
||||||
result = Git.last_revision_of_file(repo, file, before_commit: rev)
|
result = Git.last_revision_of_file(repo, file, before_commit: rev)
|
||||||
if result.empty?
|
if result.empty?
|
||||||
ohai "Skipping revision #{rev} - file is empty at this revision" if ARGV.debug?
|
odebug "Skipping revision #{rev} - file is empty at this revision" if ARGV.debug?
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
test_formula = formula_at_revision(repo, name, file, rev)
|
test_formula = formula_at_revision(repo, name, file, rev)
|
||||||
break if test_formula.nil? || test_formula.version == version
|
break if test_formula.nil? || test_formula.version == version
|
||||||
|
|
||||||
ohai "Trying #{test_formula.version} from revision #{rev} against desired #{version}" if ARGV.debug?
|
odebug "Trying #{test_formula.version} from revision #{rev} against desired #{version}" if ARGV.debug?
|
||||||
end
|
end
|
||||||
odie "Could not find #{name}! The formula or version may not have existed." if test_formula.nil?
|
odie "Could not find #{name}! The formula or version may not have existed." if test_formula.nil?
|
||||||
else
|
else
|
||||||
@ -181,7 +181,7 @@ module Homebrew
|
|||||||
brew extract --force --version=#{version} #{name} #{destination_tap.name}
|
brew extract --force --version=#{version} #{name} #{destination_tap.name}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
ohai "Overwriting existing formula at #{path}" if ARGV.debug?
|
odebug "Overwriting existing formula at #{path}" if ARGV.debug?
|
||||||
path.delete
|
path.delete
|
||||||
end
|
end
|
||||||
ohai "Writing formula for #{name} from revision #{rev} to #{path}"
|
ohai "Writing formula for #{name} from revision #{rev} to #{path}"
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class FormulaVersions
|
|||||||
rescue *IGNORED_EXCEPTIONS => e
|
rescue *IGNORED_EXCEPTIONS => e
|
||||||
# We rescue these so that we can skip bad versions and
|
# We rescue these so that we can skip bad versions and
|
||||||
# continue walking the history
|
# continue walking the history
|
||||||
ohai "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
odebug "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
nil
|
nil
|
||||||
ensure
|
ensure
|
||||||
|
|||||||
@ -5,7 +5,7 @@ class Keg
|
|||||||
return if file.dylib_id == id
|
return if file.dylib_id == id
|
||||||
|
|
||||||
@require_relocation = true
|
@require_relocation = true
|
||||||
puts "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug?
|
odebug "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug?
|
||||||
MachO::Tools.change_dylib_id(file, id, strict: false)
|
MachO::Tools.change_dylib_id(file, id, strict: false)
|
||||||
rescue MachO::MachOError
|
rescue MachO::MachOError
|
||||||
onoe <<~EOS
|
onoe <<~EOS
|
||||||
@ -20,7 +20,7 @@ class Keg
|
|||||||
return if old == new
|
return if old == new
|
||||||
|
|
||||||
@require_relocation = true
|
@require_relocation = true
|
||||||
puts "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug?
|
odebug "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug?
|
||||||
MachO::Tools.change_install_name(file, old, new, strict: false)
|
MachO::Tools.change_install_name(file, old, new, strict: false)
|
||||||
rescue MachO::MachOError
|
rescue MachO::MachOError
|
||||||
onoe <<~EOS
|
onoe <<~EOS
|
||||||
|
|||||||
@ -236,7 +236,7 @@ module OS
|
|||||||
EOS
|
EOS
|
||||||
else
|
else
|
||||||
<<~EOS
|
<<~EOS
|
||||||
Update them from Software Update in the App Store
|
Update them from Software Update in the App Store or
|
||||||
#{Formatter.url("https://developer.apple.com/download/more/")}.
|
#{Formatter.url("https://developer.apple.com/download/more/")}.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class Resource
|
|||||||
end
|
end
|
||||||
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 SHA-256 is: #{fn.sha256}"
|
puts "For your reference the SHA-256 is: #{fn.sha256}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user