From d7545019f69194eaee0d95033973171a7812604e Mon Sep 17 00:00:00 2001 From: Jeromy Cannon Date: Fri, 10 Jan 2025 14:52:56 +0000 Subject: [PATCH] fix file size empty error when throttle file is provided on command line Signed-off-by: Jeromy Cannon --- src/core/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/helpers.ts b/src/core/helpers.ts index 719b31921..c4effc803 100644 --- a/src/core/helpers.ts +++ b/src/core/helpers.ts @@ -366,7 +366,7 @@ export function resolveValidJsonFilePath(filePath: string, defaultPath?: string) const throttleInfo = fs.statSync(resolvedFilePath); if (throttleInfo.size === 0 && defaultPath) { return resolveValidJsonFilePath(defaultPath, null); - } else if (!defaultPath) { + } else if (throttleInfo.size === 0) { throw new SoloError(`File is empty: ${filePath}`); }