Skip to content

Commit

Permalink
Logging when there is no internet connection
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Aug 15, 2024
1 parent 72f1698 commit 354e6ca
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions cmd/soroban-cli/src/commands/network/container/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,22 @@ impl Runner {
None,
);

while let Ok(Some(output)) = stream.try_next().await {
if let Some(status) = output.status {
if status.contains("Pulling from")
|| status.contains("Digest")
|| status.contains("Status")
{
self.print.infoln(format!("{}", status));
while let Some(result) = stream.try_next().await.transpose() {
match result {
Ok(item) => {
if let Some(status) = item.status {
if status.contains("Pulling from")
|| status.contains("Digest")
|| status.contains("Status")
{
self.print.infoln(format!("{}", status));
}
}
}
Err(_) => {
self.print.warnln("Failed to fetch image from Docker Hub.");
self.print.warnln("Attempting to start local quickstart image instead. Please note this image may be out-of-date.");
break;
}
}
}
Expand Down

0 comments on commit 354e6ca

Please sign in to comment.