mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-12 22:17:41 +00:00
stash: add a note about Clap's multicall handling
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I4aec7f38ab24a6cd6310630f2169690c6a6a6964
This commit is contained in:
parent
81683ded03
commit
84cf1b46ad
1 changed files with 6 additions and 0 deletions
|
|
@ -204,6 +204,12 @@ fn main() -> eyre::Result<()> {
|
|||
color_eyre::install()?;
|
||||
|
||||
// Check if we're being called as a multicall binary
|
||||
//
|
||||
// NOTE: We cannot use clap's multicall here because it requires the main
|
||||
// command to have no arguments (only subcommands), but our Cli has global
|
||||
// arguments like --max-items, --db-path, etc. Instead, we manually detect
|
||||
// the invocation name and route appropriately. While this is ugly, it's
|
||||
// seemingly the only option.
|
||||
let program_name = env::args().next().map(|s| {
|
||||
PathBuf::from(s)
|
||||
.file_name()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue