pass second argument to ohai when applicable
This commit is contained in:
parent
a6643b4adf
commit
571179ff0e
@ -367,8 +367,7 @@ module Cask
|
||||
|
||||
resolved_paths = each_resolved_path(:trash, paths).to_a
|
||||
|
||||
ohai "Trashing files:"
|
||||
puts resolved_paths.map(&:first)
|
||||
ohai "Trashing files:", resolved_paths.map(&:first)
|
||||
trash_paths(*resolved_paths.flat_map(&:last), **options)
|
||||
end
|
||||
|
||||
|
@ -39,8 +39,8 @@ module Cask
|
||||
private
|
||||
|
||||
def run_installer(command: nil, verbose: false, **_options)
|
||||
ohai "Running installer for #{cask}; your password may be necessary."
|
||||
ohai "Package installers may write to any location; options such as --appdir are ignored."
|
||||
ohai "Running installer for #{cask}; your password may be necessary.",
|
||||
"Package installers may write to any location; options such as --appdir are ignored."
|
||||
unless path.exist?
|
||||
pkg = path.relative_path_from(cask.staged_path)
|
||||
pkgs = Pathname.glob(cask.staged_path/"**"/"*.pkg").map { |path| path.relative_path_from(cask.staged_path) }
|
||||
|
@ -22,8 +22,8 @@ module Cask
|
||||
sudo = !path.parent.writable?
|
||||
|
||||
if sudo && !ENV.key?("SUDO_ASKPASS") && $stdout.tty?
|
||||
ohai "Creating Caskroom at #{path}"
|
||||
ohai "We'll set permissions properly so we won't need sudo in the future."
|
||||
ohai "Creating Caskroom directory: #{path}",
|
||||
"We'll set permissions properly so we won't need sudo in the future."
|
||||
end
|
||||
|
||||
SystemCommand.run("/bin/mkdir", args: ["-p", path], sudo: sudo)
|
||||
|
@ -119,15 +119,11 @@ module Homebrew
|
||||
print_casks = args.cask?
|
||||
print_formulae = print_casks = true if !print_formulae && !print_casks
|
||||
|
||||
if print_formulae && all_formulae.any?
|
||||
ohai "Formulae"
|
||||
puts Formatter.columns(all_formulae)
|
||||
end
|
||||
ohai "Formulae", Formatter.columns(all_formulae) if print_formulae && all_formulae.any?
|
||||
|
||||
if print_casks && all_casks.any?
|
||||
puts if args.formula? && all_formulae.any?
|
||||
ohai "Casks"
|
||||
puts Formatter.columns(all_casks)
|
||||
ohai "Casks", Formatter.columns(all_casks)
|
||||
end
|
||||
|
||||
count = all_formulae.count + all_casks.count
|
||||
|
@ -470,10 +470,7 @@ class ReporterHub
|
||||
dump_formula_report :M, "Updated Formulae"
|
||||
else
|
||||
updated = select_formula(:M).count
|
||||
if updated.positive?
|
||||
ohai "Updated Formulae"
|
||||
puts "Updated #{updated} #{"formula".pluralize(updated)}."
|
||||
end
|
||||
ohai "Updated Formulae", "Updated #{updated} #{"formula".pluralize(updated)}." if updated.positive?
|
||||
end
|
||||
dump_formula_report :R, "Renamed Formulae"
|
||||
dump_formula_report :D, "Deleted Formulae"
|
||||
@ -482,10 +479,7 @@ class ReporterHub
|
||||
dump_formula_report :MC, "Updated Casks"
|
||||
else
|
||||
updated = select_formula(:MC).count
|
||||
if updated.positive?
|
||||
ohai "Updated Casks"
|
||||
puts "Updated #{updated} #{"cask".pluralize(updated)}."
|
||||
end
|
||||
ohai "Updated Casks", "Updated #{updated} #{"cask".pluralize(updated)}." if updated.positive?
|
||||
end
|
||||
dump_formula_report :DC, "Deleted Casks"
|
||||
end
|
||||
@ -525,8 +519,7 @@ class ReporterHub
|
||||
return if formulae.empty?
|
||||
|
||||
# Dump formula list.
|
||||
ohai title
|
||||
puts Formatter.columns(formulae.sort)
|
||||
ohai title, Formatter.columns(formulae.sort)
|
||||
end
|
||||
|
||||
def installed?(formula)
|
||||
|
@ -214,8 +214,7 @@ module Homebrew
|
||||
odebug "Overwriting existing formula at #{path}"
|
||||
path.delete
|
||||
end
|
||||
ohai "Writing formula for #{name} from revision #{rev} to:"
|
||||
puts path
|
||||
ohai "Writing formula for #{name} from revision #{rev} to:", path
|
||||
path.write result
|
||||
end
|
||||
|
||||
|
@ -59,8 +59,7 @@ module Homebrew
|
||||
require "keg"
|
||||
require "cask"
|
||||
|
||||
ohai "Interactive Homebrew Shell"
|
||||
puts "Example commands available with: brew irb --examples"
|
||||
ohai "Interactive Homebrew Shell", "Example commands available with: brew irb --examples"
|
||||
if args.pry?
|
||||
Pry.start
|
||||
else
|
||||
|
@ -276,8 +276,7 @@ module SharedEnvExtension
|
||||
flags = []
|
||||
|
||||
if fc
|
||||
ohai "Building with an alternative Fortran compiler"
|
||||
puts "This is unsupported."
|
||||
ohai "Building with an alternative Fortran compiler", "This is unsupported."
|
||||
self["F77"] ||= fc
|
||||
else
|
||||
if (gfortran = which("gfortran", (HOMEBREW_PREFIX/"bin").to_s))
|
||||
|
@ -65,9 +65,6 @@ class Mktemp
|
||||
ignore_interrupts { rm_rf(tmpdir) } unless retain?
|
||||
end
|
||||
ensure
|
||||
if retain? && !@tmpdir.nil? && !@quiet
|
||||
ohai "Kept temporary files"
|
||||
puts "Temporary files retained at #{@tmpdir}"
|
||||
end
|
||||
ohai "Temporary files retained at:", @tmpdir.to_s if retain? && !@tmpdir.nil? && !@quiet
|
||||
end
|
||||
end
|
||||
|
@ -127,8 +127,7 @@ class Sandbox
|
||||
end
|
||||
|
||||
if @failed && Homebrew::EnvConfig.verbose?
|
||||
ohai "Sandbox log"
|
||||
puts logs
|
||||
ohai "Sandbox log", logs
|
||||
$stdout.flush # without it, brew test-bot would fail to catch the log
|
||||
end
|
||||
end
|
||||
|
@ -194,8 +194,7 @@ module UnpackStrategy
|
||||
)
|
||||
|
||||
if verbose && !(eula_text = without_eula.stdout).empty?
|
||||
ohai "Software License Agreement for '#{path}':"
|
||||
puts eula_text
|
||||
ohai "Software License Agreement for '#{path}':", eula_text
|
||||
end
|
||||
|
||||
with_eula.plist
|
||||
|
Loading…
x
Reference in New Issue
Block a user