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
This commit is contained in:
Povilas Balciunas 2024-10-08 16:12:48 +02:00
parent d7d81384c2
commit 83e1cf8e65
1 changed files with 3 additions and 2 deletions

View File

@ -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
}
}