mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 13:43:47 +03:00
Fix compilation on Windows
This commit is contained in:
parent
35a81d7c5b
commit
56c139f003
1 changed files with 4 additions and 1 deletions
|
@ -31,6 +31,9 @@ import (
|
||||||
func removeCaddyBinary(path string) error {
|
func removeCaddyBinary(path string) error {
|
||||||
var sI syscall.StartupInfo
|
var sI syscall.StartupInfo
|
||||||
var pI syscall.ProcessInformation
|
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)
|
return syscall.CreateProcess(nil, argv, nil, nil, true, 0, nil, nil, &sI, &pI)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue