Fix the --icon=never in case of no tty

This commit is contained in:
Peltoche 2019-01-12 11:54:47 +01:00 committed by Pierre Peltier
parent 398907f81a
commit 5f50be78e9
2 changed files with 2 additions and 1 deletions

2
Cargo.lock generated
View file

@ -84,7 +84,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lsd"
version = "0.11.1"
version = "0.11.2-pre"
dependencies = [
"ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono-humanize 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -30,6 +30,7 @@ impl Core {
let icon_theme = match (tty_available, flags.icon) {
(true, WhenFlag::Never) => icon::Theme::NoIcon,
(false, WhenFlag::Never) => icon::Theme::NoIcon,
(false, WhenFlag::Auto) => icon::Theme::NoIcon,
(false, WhenFlag::Always) => icon::Theme::Default,
_ => icon::Theme::Default,