From 76d49771d9b85c5cb4cc70022ebe7b802a5b3cdf Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 6 Dec 2022 08:45:49 -0800 Subject: [PATCH] rename force-delete to purge hidden flag (#4387) --- cmd/rm-main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/rm-main.go b/cmd/rm-main.go index eee4f3ee..2c0524b2 100644 --- a/cmd/rm-main.go +++ b/cmd/rm-main.go @@ -97,8 +97,8 @@ var ( Usage: "remove object(s) versions that are non-current", }, cli.BoolFlag{ - Name: "force-delete", - Usage: "attempt a prefix force delete, requires confirmation please use with caution", + Name: "purge", + Usage: "attempt a prefix purge, requires confirmation please use with caution - only works with '--force'", Hidden: true, }, } @@ -210,7 +210,7 @@ func checkRmSyntax(ctx context.Context, cliCtx *cli.Context, encKeyDB map[string isDangerous := cliCtx.Bool("dangerous") isVersions := cliCtx.Bool("versions") isNoncurrentVersion := cliCtx.Bool("non-current") - isForceDel := cliCtx.Bool("force-delete") + isForceDel := cliCtx.Bool("purge") versionID := cliCtx.String("version-id") rewind := cliCtx.String("rewind") isNamespaceRemoval := false @@ -227,12 +227,12 @@ func checkRmSyntax(ctx context.Context, cliCtx *cli.Context, encKeyDB map[string if isForceDel && !isForce { fatalIf(errDummy().Trace(), - "You cannot specify --force-delete without --force.") + "You cannot specify --purge without --force.") } if isForceDel && isRecursive { fatalIf(errDummy().Trace(), - "You cannot specify --force-delete with --recursive.") + "You cannot specify --purge with --recursive.") } for _, url := range cliCtx.Args() { @@ -686,7 +686,7 @@ func mainRm(cliCtx *cli.Context) error { olderThan := cliCtx.String("older-than") newerThan := cliCtx.String("newer-than") isForce := cliCtx.Bool("force") - isForceDel := cliCtx.Bool("force-delete") + isForceDel := cliCtx.Bool("purge") withNoncurrentVersion := cliCtx.Bool("non-current") withVersions := cliCtx.Bool("versions") versionID := cliCtx.String("version-id")