mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-24 10:04:48 +08:00
Fix compilation on Windows
This commit is contained in:
parent
35a81d7c5b
commit
56c139f003
|
@ -31,6 +31,9 @@ import (
|
|||
func removeCaddyBinary(path string) error {
|
||||
var sI syscall.StartupInfo
|
||||
var pI syscall.ProcessInformation
|
||||
argv := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
|
||||
argv, err := syscall.UTF16PtrFromString(filepath.Join(os.Getenv("windir"), "system32", "cmd.exe") + " /C del " + path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return syscall.CreateProcess(nil, argv, nil, nil, true, 0, nil, nil, &sI, &pI)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user