From 3700e490605fa28763341ca6974c1ba65c5e5e9b Mon Sep 17 00:00:00 2001 From: lordwelch Date: Thu, 30 Nov 2017 19:29:28 -0700 Subject: [PATCH] Print wget error --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0b974b6..9b3f0de 100644 --- a/main.go +++ b/main.go @@ -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)