if mrbc.run fail, abort rake

This commit is contained in:
fleuria
2013-07-25 03:47:39 +08:00
parent 620e323d15
commit f4ae432497
+5
View File
@@ -262,6 +262,11 @@ module MRuby
IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{filename(infiles).join(' ')}", 'r+') do |io|
out.puts io.read
end
# if mrbc execution fail, drop the file
if not $?.exitstatus
File.delete(out.path)
exit -1
end
end
end