This commit is contained in:
Le Garff Yoann 2020-01-27 18:23:42 -05:00 committed by GitHub
commit 0b58d26239
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@ module VagrantPlugins
machine.communicate.execute("shutdown -a", error_check: false)
# Force shutdown the machine now
machine.communicate.execute("shutdown /s /t 1 /c \"Vagrant Halt\" /f /d p:4:1")
begin
machine.communicate.execute("shutdown /s /t 1 /c \"Vagrant Halt\" /f /d p:4:1")
rescue Vagrant::Errors::VagrantError
machine.communicate.execute("shutdown /s /t 1 /c \"Vagrant Halt\" /f")
end
end
end
end