core: MachineIndex cleans up machine lock files

This commit is contained in:
Mitchell Hashimoto 2014-04-15 13:45:23 -07:00
parent 1b5d7c2947
commit 32c9707aa1
1 changed files with 6 additions and 0 deletions

View File

@ -271,6 +271,12 @@ module Vagrant
lock_file = @machine_locks[id]
if lock_file
lock_file.close
begin
File.delete(lock_file.path)
rescue Errno::EACCES
# Another process is probably opened it, no problem.
end
@machine_locks.delete(id)
end
end