From 29371c32f79d9434eed976bc8ba224f366f0c21e Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Tue, 24 Jun 2025 09:53:09 +0200 Subject: [PATCH] Allow skipping the update checks using an environment variable (#900) * Allow skipping the update checks using an environment variable * Update `CHANGELOG.md` --- CHANGELOG.md | 1 + cargo-espflash/src/main.rs | 8 +++++++- espflash/src/bin/espflash.rs | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a028f7..ad6a7b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add a `check-app-descriptor` bool option to `ImageArgs` and add the flag to `flash` command (#872) - `Connection::into_serial` to get the underlying port from the connection (#882) - All methods on the now removed `Target` & `ReadEFuse`, `UsbOtg` and `RtcWdtReset` traits have been implemented directly on (#891) +- Update checks can now be skipped by setting the the `ESPFLASH_SKIP_UPDATE_CHECK` environment variable (#900) ### Changed diff --git a/cargo-espflash/src/main.rs b/cargo-espflash/src/main.rs index ef72a3f..180384b 100644 --- a/cargo-espflash/src/main.rs +++ b/cargo-espflash/src/main.rs @@ -57,7 +57,13 @@ enum CargoSubcommand { subcommand: Commands, /// Do not check for updates - #[clap(short = 'S', long, global = true, action)] + #[clap( + short = 'S', + long, + global = true, + env = "ESPFLASH_SKIP_UPDATE_CHECK", + action + )] skip_update_check: bool, }, } diff --git a/espflash/src/bin/espflash.rs b/espflash/src/bin/espflash.rs index 863601b..fc11dea 100644 --- a/espflash/src/bin/espflash.rs +++ b/espflash/src/bin/espflash.rs @@ -30,7 +30,13 @@ pub struct Cli { subcommand: Commands, /// Do not check for updates - #[clap(short = 'S', long, global = true, action)] + #[clap( + short = 'S', + long, + global = true, + env = "ESPFLASH_SKIP_UPDATE_CHECK", + action + )] skip_update_check: bool, }