MCPcopy Index your code
hub / github.com/docker/docker-agent / isManagementInvocation

Function isManagementInvocation

cmd/root/root.go:266–282  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

264}
265
266func 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,

Callers 3

ExecuteFunction · 0.85

Calls

no outgoing calls

Tested by 2