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.

#15

bug: vole admin --config loses the subcommand

closed · opened by keenan 13d ago

keenan opened this 13d ago

Steps to reproduce

cd /home/keenan/Projects/rodent-software/vole
./vole admin --config /tmp/vole-demo/vole.toml account list

Result:

usage: vole admin account <command> [options] [args]
...
vole: unknown account subcommand "--config"

Cause

cmdAdmin handles --config as an admin-namespace global and then rebuilds the local argument list as:

local = append(local, "--config", cfgPath)
local = append(local, subargs...)

so cmdAccount receives --config <path> list. cmdAccount expects the subcommand first (list) and parses the remaining arguments for --config, so it sees --config as the subcommand.

Workaround

Use the environment variable:

VOLE_CONFIG=/tmp/vole-demo/vole.toml ./vole admin account list

Fix

  • Put --config after the resource subcommand, or
  • Teach each local admin command to parse the config global before the subcommand.

Add a test that runs vole admin --config <path> account list and asserts it lists accounts rather than exiting with a usage error.

Acceptance

  • vole admin --config <path> account list, repo list, and acl show <repo> all work.
  • VOLE_CONFIG continues to work.

Comments (0)

No comments yet.