You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): honor top-level --db when a subcommand follows (#313) (#314)
`mimir --db PATH serve` silently ignored the flag and used the subcommand's
default db path — a serious footgun for MCP host configs (`args: ["--db", P,
"serve"]` connected to the wrong database with no warning). The top-level
`--db` is documented for `mimir --db PATH` but was never propagated once a
subcommand was present; each subcommand's own defaulted `--db` won.
Propagate the top-level `--db` into the subcommand when the user didn't pass a
subcommand-level one (i.e. it still equals the default). An explicit
subcommand-level `--db` always wins; ObsidianSync's Option<String> db is filled
when None. Added a `Commands::db_field_mut()` accessor + `apply_top_level_db()`
called once in main(), plus tests for the propagate / explicit-wins / obsidian
cases. Verified e2e: `mimir --db P stats` now creates/opens the DB at P.
Closes#313.
Co-authored-by: tcconnally <hermes@perseus.observer>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments