From 83e1cf8e650e3c922fe8eef337f71306c8df0d6b Mon Sep 17 00:00:00 2001 From: Povilas Balciunas Date: Tue, 8 Oct 2024 16:12:48 +0200 Subject: [PATCH] Fix 'service install' on Mac OS Without this when cloudflared is started with Mac OS launch agent it errors with: ``` Use `cloudflared tunnel run` to start tunnel {UUID} Use `cloudflared tunnel run` to start tunnel {UUID} Use `cloudflared tunnel run` to start tunnel {UUID} ``` This patch is suggested by https://github.com/cloudflare/cloudflared/issues/327#issuecomment-1763670368 --- cmd/cloudflared/common_service.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/cloudflared/common_service.go b/cmd/cloudflared/common_service.go index db7338c0..d4e0d2cc 100644 --- a/cmd/cloudflared/common_service.go +++ b/cmd/cloudflared/common_service.go @@ -24,7 +24,8 @@ func getServiceExtraArgsFromCliArgs(c *cli.Context, log *zerolog.Logger) ([]stri // currently, we only support extra args for token return buildArgsForToken(c, log) } else { - // empty extra args - return make([]string, 0), nil + return []string{ + "tunnel", "run", + }, nil } }