From 61a5cbab51e7af062b15fee1be467bc173eb230a Mon Sep 17 00:00:00 2001 From: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com> Date: Mon, 10 Nov 2025 23:52:45 +0100 Subject: [PATCH] fix: bun cli launch command fails with locally built images (#282) ## Changes Fixes `bun cli launch --all` command failing when using locally built Docker images. ### What changed - Check local Docker images first before querying Docker Hub in `checkTagExists` Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com> --- test/cli/handlers/deploy/storagehub.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/test/cli/handlers/deploy/storagehub.ts b/test/cli/handlers/deploy/storagehub.ts index 9422268d..d2466fac 100644 --- a/test/cli/handlers/deploy/storagehub.ts +++ b/test/cli/handlers/deploy/storagehub.ts @@ -205,12 +205,18 @@ const registerStorageHubNodes = async (launchedNetwork: LaunchedNetwork): Promis */ const checkTagExists = async (tag: string) => { const cleanTag = tag.trim(); - logger.debug(`Checking if image ${cleanTag} is available on Docker Hub`); - const result = await $`docker manifest inspect ${cleanTag}`.nothrow().quiet(); - invariant( - result.exitCode === 0, - `❌ Image ${tag} not found.\n Does this image exist?\n Are you logged and have access to the repository?` - ); + logger.debug(`Checking if image ${cleanTag} is available locally`); + const localResult = await $`docker image inspect ${cleanTag}`.nothrow().quiet(); - logger.success(`Image ${cleanTag} found on Docker Hub`); + if (localResult.exitCode !== 0) { + logger.debug(`Checking if image ${cleanTag} is available on Docker Hub`); + const remoteResult = await $`docker manifest inspect ${cleanTag}`.nothrow().quiet(); + invariant( + remoteResult.exitCode === 0, + `❌ Image ${tag} not found.\n Does this image exist?\n Are you logged and have access to the repository?` + ); + logger.success(`Image ${cleanTag} found on Docker Hub`); + } else { + logger.success(`Image ${cleanTag} found locally`); + } };