From 3cef380b202ded4ec316540e328ca75f06083394 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 4 Apr 2020 11:50:59 +0900 Subject: Revert part of #4959 To prevent infinite loop on errors; reported by @shuujii --- lib/mruby/build/command.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb index 3e8b3f57c..2aa7d1851 100644 --- a/lib/mruby/build/command.rb +++ b/lib/mruby/build/command.rb @@ -36,14 +36,9 @@ module MRuby private def _run(options, params={}) - - cmd_string = if NotFoundCommands.key?(@command) - command + ' ' + ( options % params ) - else - build.filename(command) + ' ' + ( options % params ) - end + return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command begin - sh cmd_string + sh build.filename(command) + ' ' + ( options % params ) rescue RuntimeError NotFoundCommands[@command] = true _run options, params -- cgit v1.2.3