isManagementInvocation reports whether args correspond to an invocation that must not trigger a self-update + restart: the docker CLI plugin metadata handshake, shell-completion script generation, and the version/help queries. Updating mid-handshake would corrupt the plugin protocol, and restarting
(args []string)
| 260 | // helper. It must dispatch through the standalone cobra path even when the |
| 261 | // docker CLI plugin reexec env is inherited (see Execute). |
| 262 | func isAskpassInvocation(args []string) bool { |
| 263 | return len(args) > 0 && args[0] == shell.AskpassCommandName |
| 264 | } |
| 265 | |
| 266 | func isManagementInvocation(args []string) bool { |
| 267 | if len(args) == 0 { |
no outgoing calls