New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bat
silently quits, rather than reporting an error, if less
is missing
#2904
Comments
I would look into this, can you assign it to me please. |
In the meantime, I tried to reproduce the issue, but I could not replicate the same behavior as @FlashSheridan .
In my case, bat defaults correctly to not using a pager if less is not present. Could it be that somehow no argument is received, causing bat to hang and wait for stdin as it normally does? |
Hmm, there could well be something else unusual about our company’s minimal Docker image. Attached is the relevant part of the session in which I created the container and encountered the problem. We’re in the process of open-sourcing; let me know if there’s anything you can’t access, or if you need more information. |
I used your image, tried to have different permissions for less, played around with bat config but the results were the same. I will try to tamper the code maybe something pops up. |
Odd, on my container the bug reproduced when I removed
This is a pretty minimal image, e.g.
|
I was checking the code, and bat should fall back to regular non-pager stdout if the pager initiation have any problems. I couldn't find any corner cases.
|
Interesting, I get the usual silent failure with a nonexistent pager:
|
What steps will reproduce the bug?
bat
on a machine withoutless
(a minimal Docker image in my case with 22.04.4 LTS (Jammy Jellyfish) x86_64, where of coursebat
was the first thing I wanted to install):sudo apt install bat fd-find…
What happens?
Nothing, but the file exists:
What did you expect to happen instead?
Error message stating that my poor pathetic installation lacked
less
.How did you install
bat
?bat version and environment
The text was updated successfully, but these errors were encountered: