mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5181 from shuujii/raise-an-exception-instead-of-exiting-when-mrbc-fails
Raise an exception instead of exiting when `mrbc` fails
This commit is contained in:
@@ -317,9 +317,9 @@ module MRuby
|
||||
out.puts io.read
|
||||
end
|
||||
# if mrbc execution fail, drop the file
|
||||
if $?.exitstatus != 0
|
||||
File.delete(out.path)
|
||||
exit(-1)
|
||||
unless $?.success?
|
||||
rm_f out.path
|
||||
fail "Command failed with status (#{$?.exitstatus}): [#{cmd[0,42]}...]"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user