diff options
Diffstat (limited to 'lib/leap_cli/util.rb')
-rw-r--r-- | lib/leap_cli/util.rb | 9 |
1 files changed, 6 insertions, 3 deletions
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 |