mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-18 01:40:34 +01:00
Do not show output of 'gls --version'
This commit is contained in:
parent
2685728695
commit
0f5500adfc
1 changed files with 7 additions and 2 deletions
|
@ -176,10 +176,15 @@ fn run() -> Result<ExitCode> {
|
|||
]
|
||||
} else {
|
||||
// MacOS
|
||||
use std::process::Command;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
// Use GNU ls, if available
|
||||
let gnu_ls_exists = Command::new("gls").arg("--version").status().is_ok();
|
||||
let gnu_ls_exists = Command::new("gls")
|
||||
.arg("--version")
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
.status()
|
||||
.is_ok();
|
||||
|
||||
if gnu_ls_exists {
|
||||
vec![
|
||||
|
|
Loading…
Reference in a new issue