summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_ext_cmake_builder.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:27:41 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:27:41 +0900
commitda345adc1c9cb6182ee11c43853f67bb41aeea76 (patch)
treedabd99a897111485bc24a883df650091181cda06 /test/rubygems/test_gem_ext_cmake_builder.rb
parentac2c07e98373bb62be618001c897fa9d5809d8a4 (diff)
`Open3.capture2e` raises exception when the command is not present.
Diffstat (limited to 'test/rubygems/test_gem_ext_cmake_builder.rb')
-rw-r--r--test/rubygems/test_gem_ext_cmake_builder.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb
index 6d4c6708f4..4af7de0da8 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
# 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'