Better debugging on searching for capabilities
This commit is contained in:
parent
2f232e0175
commit
067f431ee9
|
@ -79,7 +79,7 @@ module Vagrant
|
|||
|
||||
# Mount them!
|
||||
env[:machine].guest.capability(
|
||||
:mount_nfs, env[:nfs_host_ip], mount_folders)
|
||||
:mount_nfs_folder, env[:nfs_host_ip], mount_folders)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -146,9 +146,15 @@ module Vagrant
|
|||
# @param [Symbol] cap_name
|
||||
# @return [Module]
|
||||
def capability_module(cap_name)
|
||||
@logger.debug("Searching for cap: #{cap_name}")
|
||||
@chain.each do |guest_name, guest|
|
||||
@logger.debug("Checking in: #{guest_name}")
|
||||
caps = @capabilities[guest_name]
|
||||
return caps[cap_name] if caps && caps.has_key?(cap_name)
|
||||
|
||||
if caps && caps.has_key?(cap_name)
|
||||
@logger.debug("Found cap: #{cap_name} in #{guest_name}")
|
||||
return caps[cap_name]
|
||||
end
|
||||
end
|
||||
|
||||
nil
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
require "vagrant/util/retryable"
|
||||
|
||||
module VagrantPlugins
|
||||
module GuestLinux
|
||||
module Cap
|
||||
class MountNFS
|
||||
def self.mount_nfs(machine, ip, folders)
|
||||
extend Vagrant::Util::Retryable
|
||||
|
||||
def self.mount_nfs_folder(machine, ip, folders)
|
||||
folders.each do |name, opts|
|
||||
# Expand the guest path so we can handle things like "~/vagrant"
|
||||
expanded_guest_path = machine.guest.capability(
|
||||
|
|
Loading…
Reference in New Issue