Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Commands::EnvironmentCommand#git_path
git_path
lib/rubygems/commands/environment_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/commands/environment_command.rb, line 171
def git_path
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
ENV["PATH"].split(File::PATH_SEPARATOR).each do |path|
exts.each do |ext|
exe = File.join(path, "git#{ext}")
return exe if File.executable?(exe) && !File.directory?(exe)
end
end
nil
end
Git binary path