mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-09 08:42:18 -04:00
Make shutdown work on Nano Server
This commit is contained in:
parent
0ee1d82359
commit
a951e8d90f
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue