Skip to content

Commit 29371c3

Browse files
authored
Allow skipping the update checks using an environment variable (#900)
* Allow skipping the update checks using an environment variable * Update `CHANGELOG.md`
1 parent f12ecf3 commit 29371c3

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
- Add a `check-app-descriptor` bool option to `ImageArgs` and add the flag to `flash` command (#872)
3232
- `Connection::into_serial` to get the underlying port from the connection (#882)
3333
- All methods on the now removed `Target` & `ReadEFuse`, `UsbOtg` and `RtcWdtReset` traits have been implemented directly on (#891)
34+
- Update checks can now be skipped by setting the the `ESPFLASH_SKIP_UPDATE_CHECK` environment variable (#900)
3435

3536
### Changed
3637

cargo-espflash/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ enum CargoSubcommand {
5757
subcommand: Commands,
5858

5959
/// Do not check for updates
60-
#[clap(short = 'S', long, global = true, action)]
60+
#[clap(
61+
short = 'S',
62+
long,
63+
global = true,
64+
env = "ESPFLASH_SKIP_UPDATE_CHECK",
65+
action
66+
)]
6167
skip_update_check: bool,
6268
},
6369
}

espflash/src/bin/espflash.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ pub struct Cli {
3030
subcommand: Commands,
3131

3232
/// Do not check for updates
33-
#[clap(short = 'S', long, global = true, action)]
33+
#[clap(
34+
short = 'S',
35+
long,
36+
global = true,
37+
env = "ESPFLASH_SKIP_UPDATE_CHECK",
38+
action
39+
)]
3440
skip_update_check: bool,
3541
}
3642

0 commit comments

Comments
 (0)