Print a hint listing the other views available on the remote. Best-effort: silent if the server has no inventory endpoint or only the primary view.
(&self, remote: &HttpRemote)
| 428 | /// Best-effort: silent if the server has no inventory endpoint or only |
| 429 | /// the primary view. |
| 430 | async fn hint_other_views(&self, remote: &HttpRemote) { |
| 431 | let Ok(remote_views) = remote.list_views().await else { |
| 432 | return; |
| 433 | }; |
| 434 | let others: Vec<String> = remote_views |
| 435 | .into_iter() |
| 436 | .map(|v| v.name) |
| 437 | .filter(|name| name != &self.view) |
| 438 | .collect(); |
| 439 | if others.is_empty() { |
| 440 | return; |
| 441 | } |
| 442 | |
| 443 | print_blank(); |
| 444 | print_hint(&format!( |
| 445 | "This remote has {} other {}: {}", |
| 446 | others.len(), |
| 447 | if others.len() == 1 { "view" } else { "views" }, |
| 448 | others.join(", ") |
| 449 | )); |
| 450 | print_hint( |
| 451 | "Clone them too with 'atomic clone --all-views', or list them with 'atomic view list --remote'.", |
| 452 | ); |
| 453 | } |
| 454 | |
| 455 | /// Async implementation of the clone command. |
| 456 | /// |
no test coverage detected