Sign in

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

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Take --config anywhere in a resource command, not just after it

0f8054ad50c69af9474d730b76ef74681d89fc4e · Keenan Nemetz · 13d ago · parent 43597e5b

Take --config anywhere in a resource command, not just after it

`vole admin --config P account list` exited 129 with "unknown account
subcommand \"--config\"". The admin namespace peels --config out of the command
line, because it belongs to the namespace rather than the resource, and then
handed it back ahead of the subcommand — which every resource command reads from
its first argument. The pre-admin spellings had the same defect, so
`vole account --config P list` broke identically.

The resource command now peels the config off the front of its own argument list
before reading the subcommand. That also makes these three commands obey the
placement rule the flag parser states for everything else ("options may appear
before or after arguments"), and a --config after the subcommand still wins
because it is the later one.

The workaround paragraph in CONTRIBUTING is gone: the flag and VOLE_CONFIG are
equivalent again, as docs/cli.md now says.

Closes #01M5XCJVEZAX8SQNQMDZZF9FRJ

docs/cli.md +6

@@ -43,10 +43,16 @@ admin.
43 43
44 44 ```sh
45 45 vole admin account create alice --key ~/.ssh/id_ed25519.pub
46 vole admin --config /srv/vole/vole.toml account list
46 47 vole admin --remote origin account create bob --key bob.pub
47 48 vole admin --remote ssh://git@forge.example.com:2222 account list
48 49 ```
49 50
51 `--config` names a `vole.toml` other than the one discovery finds, and may sit on
52 either side of the command (`vole admin --config P account list` and `vole admin
53 account list --config P` are the same). It is local only: with `--remote` the
54 server's own config is the one that applies.
55
50 56 See [Accounts and access](accounts-and-access.md#remote-administration).
51 57
52 58 `vole admin account` is the documented spelling. The old `vole admin user` form