Revert part of #4959

To prevent infinite loop on errors; reported by @shuujii
parent 068b16a3
...@@ -36,14 +36,9 @@ module MRuby ...@@ -36,14 +36,9 @@ module MRuby
private private
def _run(options, params={}) def _run(options, params={})
return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command
cmd_string = if NotFoundCommands.key?(@command)
command + ' ' + ( options % params )
else
build.filename(command) + ' ' + ( options % params )
end
begin begin
sh cmd_string sh build.filename(command) + ' ' + ( options % params )
rescue RuntimeError rescue RuntimeError
NotFoundCommands[@command] = true NotFoundCommands[@command] = true
_run options, params _run options, params
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment