Make shutdown work on Nano Server
This commit is contained in:
parent
0ee1d82359
commit
a951e8d90f
|
@ -8,7 +8,11 @@ module VagrantPlugins
|
||||||
machine.communicate.execute("shutdown -a", error_check: false)
|
machine.communicate.execute("shutdown -a", error_check: false)
|
||||||
|
|
||||||
# Force shutdown the machine now
|
# 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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue