From 5d9e1a854a9985008759aa9dbe80796550952f67 Mon Sep 17 00:00:00 2001 From: Schmenn Date: Thu, 11 Feb 2021 20:52:00 +0100 Subject: [PATCH] Error Fix [^] Fixed irritating error that occurred when FFmpeg was not found. --- modules/ffmpeg-check.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/ffmpeg-check.go b/modules/ffmpeg-check.go index 5c5ab48..fe0f9e7 100644 --- a/modules/ffmpeg-check.go +++ b/modules/ffmpeg-check.go @@ -1,14 +1,18 @@ package modules import ( + "fmt" + "os" "os/exec" ) // CheckForFFmpeg looks for ffmpeg in the path -func CheckForFFmpeg() string { +func CheckForFFmpeg() (string) { path, err := exec.LookPath("ffmpeg") - Check(err) - + if err != nil { + fmt.Println("Could not find FFmpeg, maybe you don't have it installed or on your PATH") + os.Exit(1) + } return path }