diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-23 17:02:44 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-23 17:02:44 +0900 |
| commit | c6c0b796e164b1abad98f9843d99003d065dfd1d (patch) | |
| tree | 939a2d2f66bd473d83a42ae8d6077f119971856a /lib | |
| parent | b1ee892818811caed07dc138aadbc52c654944a0 (diff) | |
| parent | 2b0f908017b2a4dd6d7e6412cfe9bb347771c675 (diff) | |
| download | mruby-c6c0b796e164b1abad98f9843d99003d065dfd1d.tar.gz mruby-c6c0b796e164b1abad98f9843d99003d065dfd1d.zip | |
Merge pull request #5181 from shuujii/raise-an-exception-instead-of-exiting-when-mrbc-fails
Raise an exception instead of exiting when `mrbc` fails
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mruby/build/command.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb index e6becd3f6..6b8aca04a 100644 --- a/lib/mruby/build/command.rb +++ b/lib/mruby/build/command.rb @@ -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 |
