summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tool/lib/vcs.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index a08d40742a..d0301b92d8 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -69,6 +69,9 @@ class VCS
begin
@@dirs.each do |dir, klass, pred|
if pred ? pred[curr, dir] : File.directory?(File.join(curr, dir))
+ if klass.const_defined?(:COMMAND)
+ IO.pread([{'LANG' => 'C', 'LC_ALL' => 'C'}, klass::COMMAND, "--version"]) rescue next
+ end
vcs = klass.new(curr)
vcs.define_options(parser) if parser
vcs.set_options(options)