Check for the availability of the command when detecting
This commit is contained in:
parent
58b3a535cc
commit
f70ba9cf80
Notes:
git
2022-09-30 12:49:35 +09:00
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user