From b080a9003b416210ddf48a77797f714cb9c47e76 Mon Sep 17 00:00:00 2001 From: RedPanda Date: Mon, 2 Feb 2026 13:48:03 +0530 Subject: [PATCH 1/2] fix: Docker not found error, better UX --- src/commands/init/mod.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/commands/init/mod.rs b/src/commands/init/mod.rs index 0098d7b..79933a6 100644 --- a/src/commands/init/mod.rs +++ b/src/commands/init/mod.rs @@ -16,8 +16,16 @@ pub mod keys; pub mod path_setup; pub mod repositories; +use std::io::ErrorKind; use tracing::{info, warn}; +/// Create a friendly error for missing Docker CLI. +fn docker_not_found_error() -> Box { + "Docker CLI not found. Install Docker Desktop and ensure the 'docker' command is on PATH, then re-run 'foc-devnet init'." + .to_string() + .into() +} + /// Clean up previous foc-devnet installation. /// /// Removes the entire ~/.foc-devnet directory and optionally all foc-* Docker @@ -50,7 +58,11 @@ fn cleanup_previous_installation(remove_images: bool) -> Result<(), Box docker_not_found_error(), + _ => err.into(), + })?; if output.status.success() { let stdout = String::from_utf8_lossy(&output.stdout); @@ -59,7 +71,13 @@ fn cleanup_previous_installation(remove_images: bool) -> Result<(), Box docker_not_found_error(), + _ => err.into(), + })?; if remove_output.status.success() { removed_count += 1; From 9232699c6dd67acedd01c9f91c6a7665db853852 Mon Sep 17 00:00:00 2001 From: RedPanda Date: Mon, 2 Feb 2026 15:44:32 +0530 Subject: [PATCH 2/2] remove: reference for docker desktop --- src/commands/init/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/init/mod.rs b/src/commands/init/mod.rs index 79933a6..4ee9b34 100644 --- a/src/commands/init/mod.rs +++ b/src/commands/init/mod.rs @@ -21,7 +21,7 @@ use tracing::{info, warn}; /// Create a friendly error for missing Docker CLI. fn docker_not_found_error() -> Box { - "Docker CLI not found. Install Docker Desktop and ensure the 'docker' command is on PATH, then re-run 'foc-devnet init'." + "Docker CLI not found. Install Docker and ensure the 'docker' command is on PATH, then re-run 'foc-devnet init'." .to_string() .into() }