Stabilize explicit-s3-anonymous-auth and safe-forget-keep-tags flags

The features can no longer be disabled.
This commit is contained in:
Michael Eischer
2024-11-30 21:22:51 +01:00
parent 8f9d755b44
commit 098db935f7
4 changed files with 11 additions and 10 deletions
+1 -2
View File
@@ -8,7 +8,6 @@ import (
"strconv"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/feature"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/ui/termstatus"
"github.com/spf13/cobra"
@@ -271,7 +270,7 @@ func runForget(ctx context.Context, opts ForgetOptions, pruneOptions PruneOption
keep, remove, reasons := restic.ApplyPolicy(snapshotGroup, policy)
if feature.Flag.Enabled(feature.SafeForgetKeepTags) && !policy.Empty() && len(keep) == 0 {
if !policy.Empty() && len(keep) == 0 {
return fmt.Errorf("refusing to delete last snapshot of snapshot group \"%v\"", key.String())
}
if len(keep) != 0 && !gopts.Quiet && !gopts.JSON {