From 84cf1b46adc94d66b4309f19b209d6247572cc07 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 12 Apr 2026 22:45:02 +0300 Subject: [PATCH] stash: add a note about Clap's multicall handling Signed-off-by: NotAShelf Change-Id: I4aec7f38ab24a6cd6310630f2169690c6a6a6964 --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index f6359b1..f006d36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()