Retry on TypeError for NFS cleanup, which seems to happen during Kernel#system

This commit is contained in:
Mitchell Hashimoto 2010-09-30 01:39:05 -07:00
parent bad251a20d
commit 11e775b03b
1 changed files with 8 additions and 5 deletions

View File

@ -35,6 +35,8 @@ module Vagrant
def nfs_cleanup def nfs_cleanup
return if !File.exist?("/etc/exports") return if !File.exist?("/etc/exports")
retryable(:tries => 10, :on => TypeError) do
system("cat /etc/exports | grep 'VAGRANT-BEGIN: #{env.vm.uuid}' > /dev/null 2>&1") system("cat /etc/exports | grep 'VAGRANT-BEGIN: #{env.vm.uuid}' > /dev/null 2>&1")
if $?.to_i == 0 if $?.to_i == 0
@ -46,3 +48,4 @@ module Vagrant
end end
end end
end end
end