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/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software: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

CONTRIBUTING.md +4−5

@@ -156,16 +156,15 @@ Only use these when the task explicitly asks for them:
156 156
157 157 ## Local administration
158 158
159 Local admin commands read the instance config. Prefer the environment variable:
159 Local admin commands read the instance config. Name a different one with the flag
160 or the environment variable; they are equivalent, and the flag may sit on either
161 side of the command:
160 162
161 163 ```sh
164 ./vole admin --config /path/to/vole.toml account list
162 165 VOLE_CONFIG=/path/to/vole.toml ./vole admin account list
163 166 ```
164 167
165 `vole admin --config <path> <command>` currently loses the subcommand on some
166 paths; see issue `01M5XCJVEZAX8SQNQMDZZF9FRJ`. Use `VOLE_CONFIG` until that is
167 fixed.
168
169 168 Do not change instance-wide access rules, create accounts, retire accounts, or
170 169 delete repositories unless the task explicitly asks. Those are instance-admin
171 170 operations and are audited.