ivila commented on PR #263:
URL: 
https://github.com/apache/teaclave-trustzone-sdk/pull/263#issuecomment-3695228220

   For **5.1, "cargo-optee" is not recognized as a cargo subcommand**, it is 
because cargo invokes external binaries in an unexpected way.
   
   For example, `cargo optee build` is invoked as `cargo-optee optee build`. 
This extra "optee" argument causes the subcommand parser to fail.
   
   One workaround is to add a parsing rule or configuration option that 
discards the first (duplicate) argument:
   ```rust
   #[derive(Parser)]
   #[command(version, about, long_about = None)]
   struct Cli {
       // By stripping the duplicate "optee" argument during subcommand 
invocation, 
       // this solution maintains compatibility between standalone and 
cargo-integrated execution modes.
       #[arg(name = "tool_name", hide = true)]
       _tool_name: String,
       #[command(subcommand)]
       commands: Commands,
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to