Stebalien / term

A Rust library for terminfo parsing and terminal colors.
https://stebalien.github.io/doc/term/term/
Apache License 2.0
178 stars 49 forks source link

No output to stdout when no TTY attached in Docker container #79

Closed hauleth closed 7 years ago

hauleth commented 7 years ago

You can see this on Asciinema

This is my code that causes the issue.

I would expect to be some output (no need for colouring of course).

I will try to produce minimal example when I will have some time.

dpc commented 7 years ago

@hauleth I'm sorry. I think I made a mistake. I've looked more into it, and I believe the reason is, that you don't have TERM environment variable defined in your container, or there's something wrong with your term database, and https://github.com/slog-rs/term/blob/master/src/lib.rs#L1193 returns None which leads no logging at all.

hauleth commented 7 years ago

@dpc yeah, I have found this also. Should I open issue in slog-rs/slog for that? I think that this is soudness problem.