Skip to content

Commit cfaa2e3

Browse files
authored
Add --locked and --frozen options (esp-rs#180)
1 parent 4776cf0 commit cfaa2e3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cargo-espflash/src/main.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ pub struct BuildOpts {
6565
/// Build the application using the release profile
6666
#[clap(long)]
6767
pub release: bool,
68+
/// Require Cargo.lock is up to date
69+
#[clap(long)]
70+
pub locked: bool,
71+
/// Require Cargo.lock and cache are up to date
72+
#[clap(long)]
73+
pub frozen: bool,
6874
/// Example to build and flash
6975
#[clap(long)]
7076
pub example: Option<String>,
@@ -230,6 +236,14 @@ fn build(
230236
args.push("--release".to_string());
231237
}
232238

239+
if build_options.locked {
240+
args.push("--locked".to_string());
241+
}
242+
243+
if build_options.frozen {
244+
args.push("--frozen".to_string());
245+
}
246+
233247
if let Some(example) = &build_options.example {
234248
args.push("--example".to_string());
235249
args.push(example.to_string());

0 commit comments

Comments
 (0)