@marcel91200 / caddy Mirror · read-only / commits / 56c139f0
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 15:30 UTC

Fix compilation on Windows

Matthew Holt committed Jul 28, 2022 at 15:44 UTC 56c139f003292005dd5dd974ffd770b8620e8aef
1 file changed +4 -1
cmd/removebinary_windows.go
+4 -1
@@ -31,6 +31,9 @@ import (
31 func removeCaddyBinary(path string) error {
32 var sI syscall.StartupInfo
33 var pI syscall.ProcessInformation
34 - argv := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
34 + argv, err := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
35 + if err != nil {
36 + return err
37 + }
38 return syscall.CreateProcess(nil, argv, nil, nil, true, 0, nil, nil, &sI, &pI)
39 }