From e571052a35f032493a8a8e477f3f4278011f14fe Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Sun, 1 Sep 2013 21:51:09 -0700 Subject: [PATCH] Raise an error during capture if CutyCapt is not installed --- lib/capit/capture.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/capit/capture.rb b/lib/capit/capture.rb index f1de562..72a89e4 100644 --- a/lib/capit/capture.rb +++ b/lib/capit/capture.rb @@ -129,8 +129,12 @@ def capture_command xvfb = 'xvfb-run --server-args="-screen 0, 1024x768x24" ' xvfb.concat(cmd) else - cmd - end + if check_cutycapt + cmd + else + raise "Required package CutyCapt is not installed." + end + end end def check_xvfb