Do not continue if ffmpeg is not found. panic and die.
This commit is contained in:
@@ -3,8 +3,6 @@ package config
|
|||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func getDefaults() config {
|
func getDefaults() config {
|
||||||
@@ -40,7 +38,7 @@ func getDefaultFFMpegPath() string {
|
|||||||
cmd := exec.Command("which", "ffmpeg")
|
cmd := exec.Command("which", "ffmpeg")
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debugln("Unable to determine path to ffmpeg. Please specify it in the config file.")
|
panic("Unable to determine path to ffmpeg. Please specify it in the config file.")
|
||||||
}
|
}
|
||||||
|
|
||||||
path := strings.TrimSpace(string(out))
|
path := strings.TrimSpace(string(out))
|
||||||
|
|||||||
Reference in New Issue
Block a user