From a5498e7f637b49ec0e47ea8b5f4f6b418e11538c Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Wed, 13 Sep 2023 17:46:38 +0000 Subject: [PATCH] Fix positional arguments Add a cargo-subcommand argument so that when invoked from cargo the positional arguments ("start") parse from the correct value. Fix #99 --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 36eb167..1cc42d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,6 +51,10 @@ enum OutputFormat { #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] struct Args { + + /// The subcommand of this cargo invocation. Should always be "call-stack". + _cargo_subcommand: String, + /// Target triple for which the code is compiled #[arg(long, value_name = "TRIPLE")] target: Option,