From 51f93e585247e9de657bc47fdc38b1769f4c4b60 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 30 Jan 2020 22:51:41 +0000 Subject: [PATCH] windows: Fix build termination --- artiq-fast/windows/autounattend.nix | 8 ++++++++ artiq-fast/windows/bundle/main.go | 9 --------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/artiq-fast/windows/autounattend.nix b/artiq-fast/windows/autounattend.nix index 5853a6b..0e99339 100644 --- a/artiq-fast/windows/autounattend.nix +++ b/artiq-fast/windows/autounattend.nix @@ -267,6 +267,14 @@ let ''} + + + 1 + cmd /C shutdown /s /f /t 00 + ChangeHideFiles + + + diff --git a/artiq-fast/windows/bundle/main.go b/artiq-fast/windows/bundle/main.go index a69e544..772bf79 100644 --- a/artiq-fast/windows/bundle/main.go +++ b/artiq-fast/windows/bundle/main.go @@ -84,16 +84,7 @@ func InstallBundle(bundlePath string) error { return err } -func Shutdown() { - if err := exec.Command("cmd", "/C", "shutdown", "/s", "/f", "/t", "00").Run(); err != nil { - fmt.Println("Failed to initiate shutdown:", err) - } -} - func main() { - - defer Shutdown() - // Get path relative to binary baseDir, err := filepath.Abs(filepath.Dir(os.Args[0])) if err != nil {