Merge pull request #6801 from EricFromCanada/output-formatting

Update formatting of status messages
This commit is contained in:
Mike McQuaid 2019-12-03 11:38:56 +00:00 committed by GitHub
commit adc630f1ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 16 additions and 19 deletions

View File

@ -127,7 +127,7 @@ class Build
end
if ARGV.interactive?
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}"
if ARGV.git?

View File

@ -111,7 +111,7 @@ class Cleaner
end
if ARGV.debug?
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
path.chmod perms
end

View File

@ -35,21 +35,18 @@ module Homebrew
end
# Find commands in Homebrew/cmd
puts "Built-in commands"
puts Formatter.columns(internal_commands.sort)
ohai "Built-in commands", Formatter.columns(internal_commands.sort)
# Find commands in Homebrew/dev-cmd
puts
puts "Built-in developer commands"
puts Formatter.columns(internal_developer_commands.sort)
ohai "Built-in developer commands", Formatter.columns(internal_developer_commands.sort)
exts = external_commands
return if exts.empty?
# Find commands in the PATH
puts
puts "External commands"
puts Formatter.columns(exts)
ohai "External commands", Formatter.columns(exts)
end
def internal_commands

View File

@ -50,7 +50,7 @@ module Homebrew
first_warning = true
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)
Homebrew.failed = true
puts "No check available by the name: #{method}"

View File

@ -172,7 +172,7 @@ module Homebrew
end
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

View File

@ -121,7 +121,7 @@ module Homebrew
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
end

View File

@ -135,14 +135,14 @@ module Homebrew
file = repo/path
result = Git.last_revision_of_file(repo, file, before_commit: rev)
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
end
test_formula = formula_at_revision(repo, name, file, rev)
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
odie "Could not find #{name}! The formula or version may not have existed." if test_formula.nil?
else
@ -181,7 +181,7 @@ module Homebrew
brew extract --force --version=#{version} #{name} #{destination_tap.name}
EOS
end
ohai "Overwriting existing formula at #{path}" if ARGV.debug?
odebug "Overwriting existing formula at #{path}" if ARGV.debug?
path.delete
end
ohai "Writing formula for #{name} from revision #{rev} to #{path}"

View File

@ -44,7 +44,7 @@ class FormulaVersions
rescue *IGNORED_EXCEPTIONS => e
# We rescue these so that we can skip bad versions and
# 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
nil
ensure

View File

@ -5,7 +5,7 @@ class Keg
return if file.dylib_id == id
@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)
rescue MachO::MachOError
onoe <<~EOS
@ -20,7 +20,7 @@ class Keg
return if old == new
@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)
rescue MachO::MachOError
onoe <<~EOS

View File

@ -236,7 +236,7 @@ module OS
EOS
else
<<~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/")}.
EOS
end

View File

@ -132,7 +132,7 @@ class Resource
end
rescue ChecksumMissingError
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}"
end