rm: do not check for context builders when removing inactive

This change has been introduced in e7b5ee7518
but we should not check context builders when removing inactive
ones.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-01-24 13:08:18 +01:00
parent 6d1ff27410
commit 6cd0c11ab1
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -141,9 +141,6 @@ func rmAllInactive(ctx context.Context, txn *store.Txn, dockerCli command.Cli, i
if err != nil { if err != nil {
return errors.Wrapf(err, "cannot load %s", b.Name) return errors.Wrapf(err, "cannot load %s", b.Name)
} }
if cb := b.ContextName(); cb != "" {
return errors.Errorf("context builder cannot be removed, run `docker context rm %s` to remove this context", cb)
}
if b.Dynamic { if b.Dynamic {
return nil return nil
} }