Skip to content

Fix --output flag silently ignored unless --txt is also passed - #3039

Open
vtino17 wants to merge 2 commits into
sherlock-project:masterfrom
vtino17:fix/output-flag
Open

Fix --output flag silently ignored unless --txt is also passed#3039
vtino17 wants to merge 2 commits into
sherlock-project:masterfrom
vtino17:fix/output-flag

Conversation

@vtino17

@vtino17 vtino17 commented Jul 21, 2026

Copy link
Copy Markdown

Fixes #2992

Problem

Passing --output results.txt without --txt computes the requested filename but never writes it because the write block is guarded only by args.output_txt.

Change

Write the text report when either --txt or an explicit --output path is provided.

Regression test

The new end-to-end test invokes main with --output but without --txt, stubs network/search work, and verifies that the requested file contains the claimed URL and total.

Local result: 1 passed.

vtino17 and others added 2 commits August 11, 2026 06:22
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

vtino17 commented Aug 10, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: --output flag silently ignored unless --txt is also passed

1 participant