diff --git a/lib/si-cli/src/cmd/stop.rs b/lib/si-cli/src/cmd/stop.rs index 8b6eb9298e..f3679f610f 100644 --- a/lib/si-cli/src/cmd/stop.rs +++ b/lib/si-cli/src/cmd/stop.rs @@ -32,6 +32,7 @@ async fn invoke(app: &AppState, is_preview: bool) -> CliResult<()> { .get_existing_container(container_identifier.clone()) .await?; if existing.is_some() { + println!("Stopping container {}", container_identifier.clone()); app.container_engine() .stop_container(existing.unwrap().id.unwrap().to_string()) .await?; diff --git a/lib/si-cli/src/cmd/update.rs b/lib/si-cli/src/cmd/update.rs index a46c76cb8b..c3ebf90703 100644 --- a/lib/si-cli/src/cmd/update.rs +++ b/lib/si-cli/src/cmd/update.rs @@ -114,21 +114,23 @@ impl AppState { let current_containers = self.container_engine().get_container_details().await?; let mut containers = Vec::new(); - let latest_containers: Vec = req.json().await?; - 'outer: for latest in latest_containers { - for current in ¤t_containers { - if current.image != format!("{}/{}", latest.namespace, latest.repository) { - continue; - } + if !current_containers.is_empty() { + let latest_containers: Vec = req.json().await?; + 'outer: for latest in latest_containers { + for current in ¤t_containers { + if current.image != format!("{}/{}", latest.namespace, latest.repository) { + continue; + } - if current.version != latest.digest { - containers.push(latest); + if current.version != latest.digest { + containers.push(latest); + } + continue 'outer; } - continue 'outer; - } - // If we don't have the container locally we should fetch it - containers.push(latest); + // If we don't have the container locally we should fetch it + containers.push(latest); + } } let req = reqwest::get(format!("{host}/github/releases/latest")).await?;