diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-07-27 09:59:11 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2022-12-12 06:00:41 +0000 |
| commit | e1f42844a0b2a4dcf4c7338c41ef92f1b45393d8 (patch) | |
| tree | 3bf03e5e59e9ee00fe5c4dfe92f6b77c52eb5c4e | |
| parent | b8e542b46350cc1e7975bb711082e4cc6fcb7c82 (diff) | |
[rubygems/rubygems] Prefer RbConfig::CONFIG['EXEEXT'] over hardcorded '.exe'
https://github.com/rubygems/rubygems/commit/bc84b2d262
| -rw-r--r-- | lib/bundler.rb | 2 | ||||
| -rw-r--r-- | test/rubygems/helper.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index b20179934a..658dda3871 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -550,7 +550,7 @@ EOF def git_present? return @git_present if defined?(@git_present) - @git_present = Bundler.which("git") || Bundler.which("git.exe") + @git_present = Bundler.which("git#{RbConfig::CONFIG["EXEEXT"]}") end def feature_flag diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index 8d94f82d8e..45a5a14251 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -337,7 +337,7 @@ class Gem::TestCase < Test::Unit::TestCase ruby end - @git = ENV["GIT"] || (win_platform? ? "git.exe" : "git") + @git = ENV["GIT"] || "git#{RbConfig::CONFIG['EXEEXT']}" Gem.ensure_gem_subdirectories @gemhome Gem.ensure_default_gem_subdirectories @gemhome @@ -1263,7 +1263,7 @@ Also, a list: ruby = ENV["RUBY"] return ruby if ruby ruby = "ruby" - rubyexe = "#{ruby}.exe" + rubyexe = "#{ruby}#{RbConfig::CONFIG['EXEEXT']}" 3.times do if File.exist?(ruby) && File.executable?(ruby) && !File.directory?(ruby) |
