Only need to check one folder

This commit is contained in:
Jeff Bonhag 2019-11-06 13:34:23 -05:00
parent c5439f6b43
commit ac6f555175
1 changed files with 3 additions and 7 deletions

View File

@ -266,13 +266,9 @@ module VagrantPlugins
@_modinfo_path = Vagrant::Util::Which.which("modinfo")
if @_modinfo_path.to_s.empty?
folders = ["/sbin"]
folders.each do |folder|
path = "#{folder}/modinfo"
if File.file?(path)
@_modinfo_path = path
break
end
path = "/sbin/modinfo"
if File.file?(path)
@_modinfo_path = path
end
end