Skip to content
/ espup Public
forked from esp-rs/espup

Commit

Permalink
Add an env variable to allow skipping the call to the github api
Browse files Browse the repository at this point in the history
Github's API likes not responding to some requests. Let's see if we can
just skip it without issue.
  • Loading branch information
codyps committed Sep 7, 2023
1 parent da41400 commit 30a50d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/toolchain/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ impl XtensaRust {

/// Parses the version of the Xtensa toolchain.
pub fn parse_version(arg: &str) -> Result<String, Error> {
if std::env::var_os("ESPUP_SKIP_VERSION_PARSE").is_some() {
return Ok(arg.to_string());
}

debug!("{} Parsing Xtensa Rust version: {}", emoji::DEBUG, arg);
let re_extended = Regex::new(RE_EXTENDED_SEMANTIC_VERSION).unwrap();
let re_semver = Regex::new(RE_SEMANTIC_VERSION).unwrap();
Expand Down

0 comments on commit 30a50d0

Please sign in to comment.