class Gem::Commands::EnvironmentCommand
def git_path
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