TUN-8629: Cloudflared update on Windows requires running it twice to update

This commit is contained in:
Dean Sundquist 2024-09-09 16:47:07 +00:00
parent cd8cb47866
commit 5c5d1dc161
1 changed files with 1 additions and 1 deletions

View File

@ -30,9 +30,9 @@ const (
// start the service // start the service
// exit with code 0 if we've reached this point indicating success. // exit with code 0 if we've reached this point indicating success.
windowsUpdateCommandTemplate = `sc stop cloudflared >nul 2>&1 windowsUpdateCommandTemplate = `sc stop cloudflared >nul 2>&1
del "{{.OldPath}}"
rename "{{.TargetPath}}" {{.OldName}} rename "{{.TargetPath}}" {{.OldName}}
rename "{{.NewPath}}" {{.BinaryName}} rename "{{.NewPath}}" {{.BinaryName}}
del "{{.OldPath}}"
sc start cloudflared >nul 2>&1 sc start cloudflared >nul 2>&1
exit /b 0` exit /b 0`
batchFileName = "cfd_update.bat" batchFileName = "cfd_update.bat"