diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-14 16:08:10 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-14 16:08:10 +0900 |
| commit | fdbb1731cedaca0abe3856fbc296a375a8bfb286 (patch) | |
| tree | b1b3236ea3549b1d38bb932a33efafde032cb833 /lib | |
| parent | 5edac8b8850b20697466bd5866fedfff6db23c6e (diff) | |
| parent | 0c55b85fb0a5f5f1b3fd7a63a7f7eabe7b89bf3d (diff) | |
| download | mruby-fdbb1731cedaca0abe3856fbc296a375a8bfb286.tar.gz mruby-fdbb1731cedaca0abe3856fbc296a375a8bfb286.zip | |
Merge pull request #5128 from shuujii/simplify-MRubyCommand-_run-to-avoid-duplicated-compilation
Simplify `MRuby::Command#_run` to avoid duplicated compilation
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mruby/build/command.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb index 3d47c304f..f8dddd5b1 100644 --- a/lib/mruby/build/command.rb +++ b/lib/mruby/build/command.rb @@ -36,13 +36,7 @@ module MRuby private def _run(options, params={}) - return sh command + ' ' + ( options % params ) if NotFoundCommands.key? @command - begin - sh build.filename(command) + ' ' + ( options % params ) - rescue RuntimeError - NotFoundCommands[@command] = true - _run options, params - end + sh "#{build.filename(command)} #{options % params}" end end |
