(ctx context.Context, dockerCLI command.Cli, options signerRemoveOptions)
| 40 | } |
| 41 | |
| 42 | func removeSigner(ctx context.Context, dockerCLI command.Cli, options signerRemoveOptions) error { |
| 43 | var errRepos []string |
| 44 | for _, repo := range options.repos { |
| 45 | _, _ = fmt.Fprintf(dockerCLI.Out(), "Removing signer \"%s\" from %s...\n", options.signer, repo) |
| 46 | if _, err := removeSingleSigner(ctx, dockerCLI, repo, options.signer, options.forceYes); err != nil { |
| 47 | _, _ = fmt.Fprintln(dockerCLI.Err(), err.Error()+"\n") |
| 48 | errRepos = append(errRepos, repo) |
| 49 | } |
| 50 | } |
| 51 | if len(errRepos) > 0 { |
| 52 | return fmt.Errorf("error removing signer from: %s", strings.Join(errRepos, ", ")) |
| 53 | } |
| 54 | return nil |
| 55 | } |
| 56 | |
| 57 | func isLastSignerForReleases(roleWithSig data.Role, allRoles []client.RoleWithSignatures) (bool, error) { |
| 58 | var releasesRoleWithSigs client.RoleWithSignatures |
searching dependent graphs…