synced_folders/nfs: allow plugins to provide valid NFS ids

This commit is contained in:
Mitchell Hashimoto 2013-12-06 16:42:34 -08:00
parent 2c65d247da
commit d80f32c20f
1 changed files with 6 additions and 3 deletions

View File

@ -52,10 +52,13 @@ module VagrantPlugins
end
def cleanup(machine, opts)
ids = opts[:nfs_valid_ids]
if !ids
# Get the ID of all active machines.
ids = machine.env.active_machines.map do |name, provider|
machine.env.machine(name, provider).id
end
end
# Prune any of the unused machines
machine.env.host.nfs_prune(ids)