From 86b89bb1d729d4f66a8a8819457f1b656b6a2263 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Thu, 30 Nov 2017 19:38:02 -0700 Subject: [PATCH] Print wget output correctly --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 9e2399b..f2bdf81 100644 --- a/main.go +++ b/main.go @@ -42,10 +42,12 @@ func main() { torrentName = filepath.Base(url) torrentPath = filepath.Join(unselectedDir, torrentName) cmd := exec.Command("wget", url, "-o", torrentPath) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr err := cmd.Run() + fmt.Println() if err != nil { fmt.Println("url failed: ", url) - test, _ := cmd.CombinedOutput() fmt.Println(test) fmt.Println(err) continue