From 0f5500adfc8ba76a7016d18e3bcd215f1c22be12 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 15 Apr 2020 20:31:59 +0200 Subject: [PATCH] Do not show output of 'gls --version' --- src/main.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 37c7342..4aac079 100644 --- a/src/main.rs +++ b/src/main.rs @@ -176,10 +176,15 @@ fn run() -> Result { ] } 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![