mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Open3.capture2e
raises exception when the command is not present.
This commit is contained in:
parent
ac2c07e983
commit
da345adc1c
1 changed files with 5 additions and 3 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue