rename force-delete to purge hidden flag (#4387)
This commit is contained in:
+6
-6
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user