From 5c5d1dc1615ac22348b04d7a474272e9f7071b91 Mon Sep 17 00:00:00 2001 From: Dean Sundquist Date: Mon, 9 Sep 2024 16:47:07 +0000 Subject: [PATCH] TUN-8629: Cloudflared update on Windows requires running it twice to update --- cmd/cloudflared/updater/workers_update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cloudflared/updater/workers_update.go b/cmd/cloudflared/updater/workers_update.go index 800fa4fe..b7a86ff1 100644 --- a/cmd/cloudflared/updater/workers_update.go +++ b/cmd/cloudflared/updater/workers_update.go @@ -30,9 +30,9 @@ const ( // start the service // exit with code 0 if we've reached this point indicating success. windowsUpdateCommandTemplate = `sc stop cloudflared >nul 2>&1 +del "{{.OldPath}}" rename "{{.TargetPath}}" {{.OldName}} rename "{{.NewPath}}" {{.BinaryName}} -del "{{.OldPath}}" sc start cloudflared >nul 2>&1 exit /b 0` batchFileName = "cfd_update.bat"