summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/leap_cli/log.rb4
-rw-r--r--lib/leap_cli/util.rb9
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/leap_cli/log.rb b/lib/leap_cli/log.rb
index 58f1a1c..a9676de 100644
--- a/lib/leap_cli/log.rb
+++ b/lib/leap_cli/log.rb
@@ -43,9 +43,9 @@ def log2(message=nil, &block)
end
def progress(message)
- log1(" * " + message)
+ log1(" = " + message)
end
def progress2(message)
- log2(" * " + message)
+ log2(" = " + message)
end
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb
index ba88891..f163387 100644
--- a/lib/leap_cli/util.rb
+++ b/lib/leap_cli/util.rb
@@ -60,10 +60,11 @@ module LeapCli
cmd = cmd + " 2>&1"
output = `#{cmd}`
unless $?.success?
- log1(" * run: #{cmd}")
- log1(" * FAILED: (exit #{$?}) #{output}")
+ progress("run: #{cmd}")
+ progress(Paint["FAILED", :red] + ": (exit #{$?.exitstatus}) #{output}")
+ bail!
else
- log2(" * run: #{cmd}")
+ progress2(Paint["ran",:green] + ": #{cmd}")
end
return output
end
@@ -88,7 +89,7 @@ module LeapCli
rescue NoMethodError
rescue NameError
end
- assert! value, "* Error: Nothing set for #{conf_path}"
+ assert! value, " = Error: Nothing set for #{conf_path}"
end
def assert_files_exist!(*files)