Revert part of #4959

To prevent infinite loop on errors; reported by @shuujii
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-04-04 11:50:59 +09:00
parent 068b16a352
commit 3cef380b20
+2 -7
View File
@@ -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