Skip to content

Commit

Permalink
fix: auto-updater is pulling from wrong remote (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
dprats authored Nov 27, 2024
1 parent 60e054f commit 436e83c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions clients/cli/src/utils/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl UpdaterConfig {
"{}/.nexus/network-api",
std::env::var("HOME").unwrap_or_default()
),
remote_repo: String::from("https://github.com/nexus-labs/nexus-prover.git"),
remote_repo: String::from("https://github.com/nexus-xyz/network-api.git"),
update_interval: 300, // check for updates every 5 minutes (300 seconds)
hostname,
},
Expand Down Expand Up @@ -252,7 +252,23 @@ impl VersionManager {
/// update the version status of the CLI. is there an update available?
pub fn update_version_status(&self) -> Result<VersionStatus, Box<dyn std::error::Error>> {
let this_repo_version = self.current_version.read().clone();
let latest_version = self.get_cli_release_version(false)?;

// debug output
println!(
"{}[auto-updater thread]{} Checking for updates from: {}",
BLUE, RESET, self.config.remote_repo
);

let latest_version = match self.get_cli_release_version(false) {
Ok(version) => version,
Err(e) => {
println!(
"{}[auto-updater thread]{} Version check failed: {}",
BLUE, RESET, e
);
return Ok(VersionStatus::UpToDate); // Gracefully handle error by assuming up-to-date
}
};

println!(
"{}[auto-updater thread]{} Current version of CLI: {} | Latest version of CLI: {}",
Expand Down

0 comments on commit 436e83c

Please sign in to comment.