Fix --output flag silently ignored unless --txt is also passed - #3039
Open
vtino17 wants to merge 2 commits into
Open
Fix --output flag silently ignored unless --txt is also passed#3039vtino17 wants to merge 2 commits into
vtino17 wants to merge 2 commits into
Conversation
When --output is provided without --txt, the result_file variable is set correctly but the write block never executes because it's guarded only by args.output_txt. Changed condition to also trigger when args.output is set. Fixes sherlock-project#2992
vtino17
force-pushed
the
fix/output-flag
branch
from
August 10, 2026 23:34
fc75455 to
58627ce
Compare
Author
|
I rebased this branch onto the current master and added an end-to-end regression test. The test invokes main with --output but without --txt, stubs network/search work, and verifies the requested file contains the claimed URL and total. Local result: 1 passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2992
Problem
Passing
--output results.txtwithout--txtcomputes the requested filename but never writes it because the write block is guarded only byargs.output_txt.Change
Write the text report when either
--txtor an explicit--outputpath is provided.Regression test
The new end-to-end test invokes
mainwith--outputbut without--txt, stubs network/search work, and verifies that the requested file contains the claimed URL and total.Local result:
1 passed.