From d74265e44dba3ad1059086314975fd4d4476416a Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 2 May 2014 14:04:43 +1000 Subject: [PATCH] Ctrl-C now cancels karma --- lib/tasks/karma.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/karma.rake b/lib/tasks/karma.rake index 6201c66e61..33a1d05dd4 100644 --- a/lib/tasks/karma.rake +++ b/lib/tasks/karma.rake @@ -13,7 +13,9 @@ namespace :karma do Tempfile.open('karma_unit.js', Rails.root.join('tmp') ) do |f| f.write unit_js(application_spec_files) f.flush - system "karma #{command} #{f.path} #{args}" + trap('SIGINT') { puts "Killing Karma"; exit } + exec "karma #{command} #{f.path} #{args}" + #%x{karma #{command} #{f.path} #{args}} end end