mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-24 22:26:43 -05:00
versionsapi: fix single version deletion in cli
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
aa1b2f8d30
commit
4f9ed08061
@ -139,16 +139,16 @@ func runRemove(cmd *cobra.Command, args []string) (retErr error) {
|
||||
func deleteSingleVersion(ctx context.Context, clients rmImageClients, ver versionsapi.Version, dryrun bool, log *logger.Logger) error {
|
||||
var retErr error
|
||||
|
||||
log.Debugf("Deleting version %s from versions API", ver.Version)
|
||||
if err := clients.version.DeleteVersion(ctx, ver); err != nil {
|
||||
retErr = multierr.Append(retErr, fmt.Errorf("deleting version from versions API: %w", err))
|
||||
}
|
||||
|
||||
log.Debugf("Deleting images for %s", ver.Version)
|
||||
if err := deleteImage(ctx, clients, ver, dryrun, log); err != nil {
|
||||
retErr = multierr.Append(retErr, fmt.Errorf("deleting images: %w", err))
|
||||
}
|
||||
|
||||
log.Debugf("Deleting version %s from versions API", ver.Version)
|
||||
if err := clients.version.DeleteVersion(ctx, ver); err != nil {
|
||||
retErr = multierr.Append(retErr, fmt.Errorf("deleting version from versions API: %w", err))
|
||||
}
|
||||
|
||||
return retErr
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user