Skip to content

Commit

Permalink
fix(dre): self update on non linux machines (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa authored Jul 8, 2024
1 parent 32b070f commit 02283c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rs/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use regex::Regex;
use registry_canister::mutations::do_change_subnet_membership::ChangeSubnetMembershipPayload;
use serde_json::Value;
use std::collections::BTreeMap;
use std::env;
use std::str::FromStr;

const STAGING_NEURON_ID: u64 = 49;
Expand Down Expand Up @@ -682,6 +683,11 @@ fn check_latest_release(curr_version: &str, proceed_with_upgrade: bool) -> anyho
return Ok(UpdateStatus::NewVersion(latest_release.version.clone()));
}

// Complete list can be found: https://doc.rust-lang.org/std/env/consts/constant.OS.html
if env::consts::OS != "linux" {
return Err(anyhow::anyhow!("Only linux is supported for automatic updates"));
}

info!("Binary not up to date. Updating to {}", latest_release.version);

let asset = match latest_release.asset_for("dre", None) {
Expand Down

0 comments on commit 02283c1

Please sign in to comment.