mirror of
https://github.com/lsd-rs/lsd
synced 2025-03-04 23:17:15 +00:00
Fix platforms specific stuff
This commit is contained in:
parent
79ebe268f2
commit
cb1de67261
1 changed files with 5 additions and 2 deletions
|
@ -6,12 +6,14 @@ use crate::meta::Meta;
|
|||
use crate::sort;
|
||||
use std::{fs, io};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use super::libc;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
use terminal_size::terminal_size;
|
||||
|
||||
use super::libc;
|
||||
|
||||
pub struct Core {
|
||||
flags: Flags,
|
||||
icons: Icons,
|
||||
|
@ -25,6 +27,7 @@ impl Core {
|
|||
// Determine color output availability (and initialize color output (for Windows 10))
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let tty_available = unsafe { libc::isatty(io::stdout().as_raw_fd()) == 1 };
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
let console_color_ok = true;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue