aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtool/test/test_sync_default_gems.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/tool/test/test_sync_default_gems.rb b/tool/test/test_sync_default_gems.rb
index 625007ca06..8e667fc4d2 100755
--- a/tool/test/test_sync_default_gems.rb
+++ b/tool/test/test_sync_default_gems.rb
@@ -78,15 +78,7 @@ module Test_SyncDefaultGems
def setup
super
@target = nil
- begin
- git_version = IO.popen(%W"git --version", &:read)
- rescue Errno::ENOENT
- pend "No git"
- else
- v = git_version.scan(/\d+/).map(&:to_i)
- # GIT_CONFIG_GLOBAL is supported since 2.32.
- pend "#{git_version} is too old" if (v <=> [2, 32]) < 0
- end
+ pend "No git" unless system("git --version", out: IO::NULL)
@testdir = Dir.mktmpdir("sync")
@git_config = ENV["GIT_CONFIG_GLOBAL"]
ENV["GIT_CONFIG_GLOBAL"] = @testdir + "/gitconfig"