(args []string)
| 264 | } |
| 265 | |
| 266 | func isManagementInvocation(args []string) bool { |
| 267 | if len(args) == 0 { |
| 268 | return false |
| 269 | } |
| 270 | switch args[0] { |
| 271 | case metadata.MetadataSubcommandName, cobra.ShellCompRequestCmd, cobra.ShellCompNoDescRequestCmd, "completion", "version", "help", "--version", shell.AskpassCommandName: |
| 272 | return true |
| 273 | } |
| 274 | // A help request can appear after a subcommand ("run --help"); never update |
| 275 | // just to print help text. |
| 276 | for _, arg := range args { |
| 277 | if arg == "--help" || arg == "-h" { |
| 278 | return true |
| 279 | } |
| 280 | } |
| 281 | return false |
| 282 | } |
| 283 | |
| 284 | // setupLogging configures slog logging behavior. |
| 285 | // When --debug is enabled, logs are written to a rotating file <dataDir>/cagent.debug.log, |
no outgoing calls