fix: correct $LESSCLOSE exit-status warning#3654
Open
cuiweixie wants to merge 2 commits intosharkdp:masterfrom
Open
fix: correct $LESSCLOSE exit-status warning#3654cuiweixie wants to merge 2 commits intosharkdp:masterfrom
cuiweixie wants to merge 2 commits intosharkdp:masterfrom
Conversation
The Drop cleanup for Preprocessed inverted the exit-status check, so bat emitted a warning when LESSCLOSE exited successfully and stayed silent on failure. Align the condition with the intended behavior.
keith-hall
reviewed
Mar 26, 2026
Collaborator
keith-hall
left a comment
There was a problem hiding this comment.
Thanks! Do you think it is possible to add an assertion for this in the integration tests, to prove the warning appears only when it should?
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.
Summary
Fix inverted logic when reporting
$LESSCLOSEcleanup failures: bat warned on successful exit and stayed silent when the command failed.Test plan
cargo test(lessopen module tests cover env handling)