Repository navigation
Fix the CLI --console flag never showing the pre-request script output - #218
Merged
Julien-cpsn merged 1 commit intoOct 19, 2026
Merged
Conversation
The console output was matched as (post, post) instead of (pre, post), so `atac request send --console` printed the post-request output twice and never the pre-request output.
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.
atac request send --consolebuilds its output from(post_request_output, post_request_output)instead of(pre_request_output, post_request_output). So the pre-request script output is never printed, and when there is a post-request script its output is printed twice:This PR changes the first element of the tuple to
pre_request_output. The TUI's console tab (tui_logic/result_tabs.rs) already uses the right pair.Test:
tests/cli_console.rsruns theatacbinary (CARGO_BIN_EXE_atac) on a collection in a temporary directory. The request has a pre- and a post-request script that bothconsole.log, and it goes to a one-shot localTcpListener. The test checks that each output appears exactly once. Onmainit fails withleft: 0, right: 1and stdout"post-request output\n\npost-request output\n\n".What was run:
cargo test: 37 unit tests plus the new integration test pass. The integration test was run 3 more times and passed each time.cargo clippy --all-targets: same warning count asmain.