From a986ce2f7fbb5c014beee64dbb97dd05f2e08ef2 Mon Sep 17 00:00:00 2001 From: Okiki Ojo Date: Thu, 12 Feb 2026 17:34:40 -0500 Subject: [PATCH] chore: enhance logging for tarball fetching with cache and redirection details Signed-off-by: Okiki Ojo --- core/plugins/tar.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/plugins/tar.ts b/core/plugins/tar.ts index ace5517..323e316 100644 --- a/core/plugins/tar.ts +++ b/core/plugins/tar.ts @@ -525,8 +525,19 @@ export async function fetchAndExtractTarball( if (/^https?:\/\//.test(source)) { // HTTP: fetch from network / shared cache. dispatchEvent(LOGGER_INFO, `Fetching tarball candidate: ${source}`); - const cached = await fetchWithCache(source); - response = cached.response; + const result = await fetchWithCache(source); + response = result.response; + + // Build descriptive log message + const flags = [ + result.fromCache && 'cached', + result.redirected && 'redirected', + ].filter(Boolean).join(', '); + + const flagStr = flags ? ` (${flags})` : ''; + const redirectStr = result.redirected ? ` → ${result.url}` : ''; + + dispatchEvent(LOGGER_INFO, `Fetch${flagStr} ${source}${redirectStr}`); if (!response.ok) { throw new Error(`Failed to fetch tarball: ${response.status} ${response.statusText}`); -- 2.51.2