From 17ac011063c30a31264137f8e38b49c391864eb7 Mon Sep 17 00:00:00 2001 From: Pascal Pickel Date: Tue, 23 Jul 2024 09:57:15 +0200 Subject: [PATCH] refactor: Moved log to better describe what is actually happening --- src/features/programSample/samples.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/programSample/samples.ts b/src/features/programSample/samples.ts index be974d65..a6a672e9 100644 --- a/src/features/programSample/samples.ts +++ b/src/features/programSample/samples.ts @@ -86,7 +86,6 @@ export const downloadFile = async (fileName: string) => { const url = `${SERVER_URL}/${fileName}`; if (existsSync(targetFile)) return; - logger.info(`Sample not found locally, downloading ${url}`); if (existsSync(fullPath(fileName))) { logger.info(`Sample is bundled with app, copying.`); @@ -94,6 +93,7 @@ export const downloadFile = async (fileName: string) => { return; } + logger.info(`Sample not found locally, downloading ${url}`); const response = await fetch(url); const blob = await response.blob(); const buffer = await blob.arrayBuffer();