ruby-changes:61149
From: Hiroshi <ko1@a...>
Date: Fri, 8 May 2020 14:30:51 +0900 (JST)
Subject: [ruby-changes:61149] da345adc1c (master): `Open3.capture2e` raises exception when the command is not present.
https://git.ruby-lang.org/ruby.git/commit/?id=da345adc1c From da345adc1c9cb6182ee11c43853f67bb41aeea76 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Fri, 8 May 2020 14:27:41 +0900 Subject: `Open3.capture2e` raises exception when the command is not present. diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb index 6d4c670..4af7de0 100644 --- a/test/rubygems/test_gem_ext_cmake_builder.rb +++ b/test/rubygems/test_gem_ext_cmake_builder.rb @@ -10,9 +10,11 @@ class TestGemExtCmakeBuilder < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_cmake_builder.rb#L10 # Details: https://github.com/rubygems/rubygems/issues/1270#issuecomment-177368340 skip "CmakeBuilder doesn't work on Windows." if Gem.win_platform? - _, status = Open3.capture2e('cmake') - - skip 'cmake not present' unless status.success? + begin + _, status = Open3.capture2e('cmake') + rescue Errno::ENOENT + skip 'cmake not present' + end @ext = File.join @tempdir, 'ext' @dest_path = File.join @tempdir, 'prefix' -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/