From 7ef3e1d8e352e0e08fa7af4a70277325d0937240 Mon Sep 17 00:00:00 2001 From: Jens Oliver Meiert Date: Wed, 9 Oct 2024 14:31:23 +0200 Subject: [PATCH] fix: clarify error message for zero compressed file size Refined the error message to be more descriptive and concise. This helps in better understanding the cause of the error when the compressed file size is zero. (This commit message was AI-generated.) Signed-off-by: Jens Oliver Meiert --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 4850c54..6064e87 100644 --- a/src/utils.js +++ b/src/utils.js @@ -102,7 +102,7 @@ const compression = async (filename, dry) => { await fs.promises.unlink(tempFilePath) if (fileSizeAfter === 0) { - console.error(chalk.red(`Error doing something meaningful here—compressed file size is 0 for ${filename}`)) + console.error(chalk.red(`Error compressing ${filename}: Compressed file size is 0`)) } return fileSizeAfter < fileSizeBefore ? fileSizeBefore - fileSizeAfter : 0