Merge pull request #3654 from cuiweixie/fix/lessclose-nonzero-warning

fix: correct $LESSCLOSE exit-status warning
This commit is contained in:
Keith Hall authored and GitHub committed 2026-04-30 08:19:42 +03:00
commit 8fbc96a5f2
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -21,6 +21,7 @@
- Syntax highlighting for Python files using uv as script runner in shebang #3689 (@janlarres)
## Bugfixes
- Fix inverted `$LESSCLOSE` warning so bat warns on nonzero exit, not on success. See #3654 (@cuiweixie)
- Sanitize control characters in filenames before displaying them in the file header, error messages, and the terminal title, preventing ANSI escape injection via crafted filenames. Closes #3054, see #3691 (@curious-rabbit)
- Report initial input read errors instead of treating them as empty input. Closes #3002, see #3706 (@lawrence3699)
- Treat ZIP archives as binary content based on their magic header, see #3686 (@officialasishkumar)
+1 -1
View File
@@ -261,7 +261,7 @@ impl Drop for Preprocessed {
}
};
if lessclose_output.status.success() {
if !lessclose_output.status.success() {
bat_warning!("$LESSCLOSE exited with nonzero exit code",)
};
}