mirror of
https://github.com/encounter/ghidra-cli.git
synced 2026-07-10 03:18:56 -07:00
fix: add --project to DiffProgramsArgs and DiffFunctionsArgs
The diff subcommands were missing --project fields, causing clap to reject the argument when tests passed --project to diff commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
45ae55c146
commit
9e3759449b
@@ -623,6 +623,8 @@ pub struct DiffProgramsArgs {
|
||||
pub program2: String,
|
||||
#[arg(long)]
|
||||
pub format: Option<String>,
|
||||
#[arg(long)]
|
||||
pub project: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Args, Clone, Serialize, Deserialize, Debug)]
|
||||
@@ -633,6 +635,8 @@ pub struct DiffFunctionsArgs {
|
||||
pub func2: String,
|
||||
#[arg(long)]
|
||||
pub format: Option<String>,
|
||||
#[arg(long)]
|
||||
pub project: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Clone, Serialize, Deserialize, Debug)]
|
||||
|
||||
@@ -223,6 +223,10 @@ fn extract_project_from_command(command: &Commands) -> Option<String> {
|
||||
cli::ProgramCommands::Info(args) => args.project.clone(),
|
||||
cli::ProgramCommands::Export(args) => args.project.clone(),
|
||||
},
|
||||
Commands::Diff(cmd) => match cmd {
|
||||
cli::DiffCommands::Programs(args) => args.project.clone(),
|
||||
cli::DiffCommands::Functions(args) => args.project.clone(),
|
||||
},
|
||||
Commands::Batch(args) => args.project.clone(),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user