refactor: consolidate URL and file handling into single --file parameter#5
refactor: consolidate URL and file handling into single --file parameter#5
Conversation
There was a problem hiding this comment.
Bugbot free trial expires on August 1, 2025
Learn more in the Cursor dashboard.
| if (parsed.url && parsed.file) { | ||
| throw new Error('Only one of --url or --file can be provided'); | ||
| if (!parsed.file) { | ||
| throw new Error('--file must be provided'); |
There was a problem hiding this comment.
Bug: Dead Code Blocks Validation
The validation check if (!parsed.file) is unreachable because it is located inside an if (parsed.file) block. This dead code prevents the necessary --file parameter validation from executing in the direct options (backward compatibility) mode, meaning the "file must be provided" error will never be thrown in this path.
Locations (1)
| } | ||
|
|
||
| if (!args.url && !args.file) { | ||
| if (!args.file) { |
There was a problem hiding this comment.
Bug: File Parameter Missing Error Message
The error message "No command or options provided" is incorrectly displayed when the --file parameter is missing. This message is misleading and should be changed to "--file must be provided" for consistency with other validation messages.
No description provided.