History

check whether ffprobe/ffmpeg are present early on

Sigrid Solveig Haflínudóttir committed 4 years ago

Commit 9bcb6fc1 parent 72ebe491 file · +8 −0Browse files

Unified · Split

main.go+8−0
@@ -6,6 +6,7 @@ import ( · 5 unmodified lines
6 "fmt"6 "fmt"
7 "log"7 "log"
8 "os"8 "os"
9 "os/exec"
9 "path/filepath"10 "path/filepath"
10 "runtime"11 "runtime"
11 "strconv"12 "strconv"
@@ -55,6 +56,13 @@ func main() { · 43 unmodified lines
55 log.Fatal(err)56 log.Fatal(err)
56 }57 }
57 58
59 if _, err = exec.LookPath("ffprobe"); err != nil {
60 log.Fatal(err)
61 }
62 if _, err = exec.LookPath("ffmpeg"); err != nil {
63 log.Fatal(err)
64 }
65
58 args := flag.Args()66 args := flag.Args()
59 if len(args) == 0 {67 if len(args) == 0 {
60 args = []string{"."}68 args = []string{"."}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t