Skip to content

Commit 5a7a6f9

Browse files
wzhdjessebraham
authored andcommitted
Add option --bin for choosing one binary when there are several
1 parent 6d47af5 commit 5a7a6f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cargo-espflash/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ pub struct BuildOpts {
8484
/// Example to build and flash
8585
#[clap(long)]
8686
pub example: Option<String>,
87+
/// Binary to build and flash
88+
#[clap(long)]
89+
pub bin: Option<String>,
8790
/// Specify a (binary) package within a workspace to be built
8891
#[clap(long)]
8992
pub package: Option<String>,
@@ -293,6 +296,11 @@ fn build(
293296
args.push(example.to_string());
294297
}
295298

299+
if let Some(bin) = &build_options.bin {
300+
args.push("--bin".to_string());
301+
args.push(bin.to_string());
302+
}
303+
296304
if let Some(package) = &build_options.package {
297305
args.push("--package".to_string());
298306
args.push(package.to_string());

0 commit comments

Comments
 (0)