Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Answer `account backup` at the check that rejects it

529a84575560f6353790232716933a07b1edb821 · Keenan Nemetz · 17d ago · parent 3047be84

Answer `account backup` at the check that rejects it

The redirect sat in a dispatch case, but cmdAccount rejects a name that is not in
the command table before it reaches the switch, so the case could never run. The
hint now comes from the rejection itself, and a test pins it: the old spelling is
not a hidden alias, only a message.

cmd/vole/account.go +7−5

@@ -109,6 +109,13 @@ func cmdAccount(args []string) error {
109 109 return nil
110 110 }
111 111 if !hasSubcommand("admin account", sub) {
112 // Backing up moved to `db` when release channels joined the instance
113 // database. A runbook written against the old spelling is the likeliest
114 // caller during the upgrade that moved the file, so it gets the new name
115 // instead of "unknown subcommand" and a page of help.
116 if sub == "backup" {
117 return usageErr{msg: "account backup is now `vole admin db backup <dir>`"}
118 }
112 119 fmt.Fprint(os.Stderr, renderHelpText(accountGroup))
113 120 return usagef("unknown account subcommand %q", sub)
114 121 }
@@ -357,11 +364,6 @@ func cmdAccount(args []string) error {
357 364 }
358 365 return nil
359 366
360 case "backup":
361 // Moved, not removed: an operator with the old spelling in a runbook gets
362 // told where the command went, and db backup covers more than accounts.
363 return usageErr{msg: "account backup is now `vole admin db backup <dir>`"}
364
365 367 case "show":
366 368 if len(f.rest) != 1 {
367 369 return usageErr{msg: "usage: vole admin account show <name>"}