aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_collection_delete.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_collection_delete.go')
-rw-r--r--weed/shell/command_collection_delete.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/weed/shell/command_collection_delete.go b/weed/shell/command_collection_delete.go
index 0239d4c55..92473e8e3 100644
--- a/weed/shell/command_collection_delete.go
+++ b/weed/shell/command_collection_delete.go
@@ -23,7 +23,7 @@ func (c *commandCollectionDelete) Name() string {
func (c *commandCollectionDelete) Help() string {
return `delete specified collection
- collection.delete -collection <collection_name> -force
+ collection.delete -collection <collection_name> -apply
`
}
@@ -36,11 +36,16 @@ func (c *commandCollectionDelete) Do(args []string, commandEnv *CommandEnv, writ
colDeleteCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
collectionName := colDeleteCommand.String("collection", "", "collection to delete. Use '_default_' for the empty-named collection.")
- applyBalancing := colDeleteCommand.Bool("force", false, "apply the collection")
+ applyBalancing := colDeleteCommand.Bool("apply", false, "apply the collection")
+ // TODO: remove this alias
+ applyBalancingAlias := colDeleteCommand.Bool("force", false, "apply the collection (alias for -apply)")
+
if err = colDeleteCommand.Parse(args); err != nil {
return nil
}
- infoAboutSimulationMode(writer, *applyBalancing, "-force")
+
+ handleDeprecatedForceFlag(writer, colDeleteCommand, applyBalancingAlias, applyBalancing)
+ infoAboutSimulationMode(writer, *applyBalancing, "-apply")
if err = commandEnv.confirmIsLocked(args); err != nil {
return
@@ -55,7 +60,7 @@ func (c *commandCollectionDelete) Do(args []string, commandEnv *CommandEnv, writ
}
if !*applyBalancing {
- fmt.Fprintf(writer, "collection '%s' will be deleted. Use -force to apply the change.\n", *collectionName)
+ fmt.Fprintf(writer, "collection '%s' will be deleted. Use -apply to apply the change.\n", *collectionName)
return nil
}