Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
jeromy-cannon committed Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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
@@ -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}`);
}

0 comments on commit d754501

Please sign in to comment.