Move odebug.

This commit is contained in:
Markus Reiter 2018-07-17 00:30:34 +02:00
parent 2452b27866
commit 01b2be755c
2 changed files with 6 additions and 8 deletions

View File

@ -4,14 +4,6 @@ require "stringio"
BUG_REPORTS_URL = "https://github.com/Homebrew/homebrew-cask#reporting-bugs".freeze
# global methods
def odebug(title, *sput)
return unless ARGV.debug?
puts Formatter.headline(title, color: :magenta)
puts sput unless sput.empty?
end
module Hbc
module Utils
def self.gain_permissions_remove(path, command: SystemCommand)

View File

@ -28,6 +28,12 @@ def ohai(title, *sput)
puts sput
end
def odebug(title, *sput)
return unless ARGV.debug?
puts Formatter.headline(title, color: :magenta)
puts sput unless sput.empty?
end
def oh1(title, options = {})
if $stdout.tty? && !ARGV.verbose? && options.fetch(:truncate, :auto) == :auto
title = Tty.truncate(title)