aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-04 01:37:02 -0800
committerelijah <elijah@riseup.net>2012-11-04 01:37:02 -0800
commitb561a3eadd43218a59650b6255f8d12266b38884 (patch)
treebf1de30c99be496bb01bf07eb43c844c86cfd602 /lib
parent7e13ddfb7cba449d74b0c0fb8b08f508d9d08b8b (diff)
downloadleap_cli-b561a3eadd43218a59650b6255f8d12266b38884.tar.gz
leap_cli-b561a3eadd43218a59650b6255f8d12266b38884.tar.bz2
distinguish between leap progress and capistrano progress
Diffstat (limited to 'lib')
-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)