From b5bf2fe3874f9ce97b36dc37b17ce66270260f03 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 27 Nov 2012 01:40:01 -0800 Subject: improved logging all around. --- lib/leap_cli/util.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/leap_cli/util.rb') diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb index c3adbdc..967acca 100644 --- a/lib/leap_cli/util.rb +++ b/lib/leap_cli/util.rb @@ -4,7 +4,6 @@ require 'fileutils' require 'erb' module LeapCli - module Util extend self @@ -54,9 +53,13 @@ module LeapCli # # assert that the command is available # - def assert_bin!(cmd_name) + def assert_bin!(cmd_name, msg=nil) assert! `which #{cmd_name}`.strip.any? do - log :missing, "command '%s'" % cmd_name + log :missing, "command '%s'" % cmd_name do + if msg + log msg + end + end end end -- cgit v1.2.3