Accept --root after the subcommand

`money serve --root DIR` failed because --root was only read before the
subcommand; after it, the flag reached serve's own flag set, which knows
only --addr, and was rejected. It is too natural a thing to type to refuse,
so run now lifts --root/--root=DIR out of any subcommand's arguments before
they are parsed. A bare `--` still ends it, and given on both sides, the one
after the command wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 18:13:01 +02:00
co-authored by Claude Opus 5.5
parent 5847245638
commit 8e4df08f43
3 changed files with 69 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ build changes its shape, delete it and run `money import` again.
Checked in order, first one wins:
1. `--root DIR` on the command line
1. `--root DIR` on the command line, before or after the command
2. `$MONEY_ROOT`
3. the `root` key in `$XDG_CONFIG_HOME/money/config.toml`, which is
`~/.config/money/config.toml` unless `XDG_CONFIG_HOME` says otherwise