Print wget error

This commit is contained in:
lordwelch 2017-11-30 19:29:28 -07:00
parent 2faca86315
commit 3700e49060

View File

@ -42,8 +42,10 @@ func main() {
torrentName = filepath.Base(url)
torrentPath = filepath.Join(unselectedDir, torrentName)
cmd := exec.Command("wget", url, "-o", torrentPath)
if cmd.Run() != nil {
err := cmd.Run()
if err != nil {
fmt.Println("url failed: ", url)
fmt.Println(err)
continue
}
process(torrentPath)