From c4540ada50fe0de6660c50a82dc166f4d5b26183 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Thu, 8 Dec 2022 01:40:19 +0100 Subject: [PATCH] Remove unwanted ffmpeg output when check if available --- crunchy-cli-core/src/utils/os.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crunchy-cli-core/src/utils/os.rs b/crunchy-cli-core/src/utils/os.rs index c6e262e..abdf151 100644 --- a/crunchy-cli-core/src/utils/os.rs +++ b/crunchy-cli-core/src/utils/os.rs @@ -1,12 +1,12 @@ use log::debug; use std::io::ErrorKind; use std::path::PathBuf; -use std::process::Command; +use std::process::{Command, Stdio}; use std::{env, io}; use tempfile::{Builder, NamedTempFile}; pub fn has_ffmpeg() -> bool { - if let Err(e) = Command::new("ffmpeg").spawn() { + if let Err(e) = Command::new("ffmpeg").stderr(Stdio::null()).spawn() { if ErrorKind::NotFound != e.kind() { debug!( "unknown error occurred while checking if ffmpeg exists: {}",