diff --git a/bin/jasmine-headless-webkit b/bin/jasmine-headless-webkit index 496a76f..1b9b28a 100755 --- a/bin/jasmine-headless-webkit +++ b/bin/jasmine-headless-webkit @@ -11,5 +11,9 @@ $:.unshift(File.join(gem_dir, 'lib')) puts "Running Jasmine specs..." require 'jasmine/headless/cli' -exit Jasmine::Headless::CLI.run +begin + exit Jasmine::Headless::CLI.run +rescue StandardError => e + exit 1 +end diff --git a/lib/jasmine/files_list.rb b/lib/jasmine/files_list.rb index 23f07a4..6cda54e 100644 --- a/lib/jasmine/files_list.rb +++ b/lib/jasmine/files_list.rb @@ -76,7 +76,7 @@ module Jasmine CoffeeScript.compile(fh = File.open(file)) rescue CoffeeScript::CompilationError => ne puts "[%s] %s: %s" % [ 'coffeescript'.color(:red), file.color(:yellow), ne.message.to_s.color(:white) ] - exit 1 + raise ne ensure fh.close end