mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
fix: warn when $LESSCLOSE fails, not when it succeeds
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.
This commit is contained in:
1 parent
3ee9ea9a8d
commit
7ff1fb3278
1 file changed
+1
-1
+1
-1
@@ -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",)
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user