TUN-8629: Cloudflared update on Windows requires running it twice to update
Some checks failed
Check / check (1.22.x, macos-latest) (push) Has been cancelled
Check / check (1.22.x, ubuntu-latest) (push) Has been cancelled
Check / check (1.22.x, windows-latest) (push) Has been cancelled

This commit is contained in:
Dean Sundquist 2024-09-09 16:47:07 +00:00
parent cd8cb47866
commit 5c5d1dc161

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"