Skip to content

Commit

Permalink
fix file size empty error when throttle file is provided on command line
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Jan 10, 2025
1 parent 3d547e4 commit d754501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}

Expand Down

0 comments on commit d754501

Please sign in to comment.