(dockerCLI command.Cli)
| 22 | } |
| 23 | |
| 24 | func newSignerRemoveCommand(dockerCLI command.Cli) *cobra.Command { |
| 25 | options := signerRemoveOptions{} |
| 26 | cmd := &cobra.Command{ |
| 27 | Use: "remove [OPTIONS] NAME REPOSITORY [REPOSITORY...]", |
| 28 | Short: "Remove a signer", |
| 29 | Args: cli.RequiresMinArgs(2), |
| 30 | RunE: func(cmd *cobra.Command, args []string) error { |
| 31 | options.signer = args[0] |
| 32 | options.repos = args[1:] |
| 33 | return removeSigner(cmd.Context(), dockerCLI, options) |
| 34 | }, |
| 35 | DisableFlagsInUseLine: true, |
| 36 | } |
| 37 | flags := cmd.Flags() |
| 38 | flags.BoolVarP(&options.forceYes, "force", "f", false, "Do not prompt for confirmation before removing the most recent signer") |
| 39 | return cmd |
| 40 | } |
| 41 | |
| 42 | func removeSigner(ctx context.Context, dockerCLI command.Cli, options signerRemoveOptions) error { |
| 43 | var errRepos []string |
searching dependent graphs…