Print wget output correctly

This commit is contained in:
lordwelch 2017-11-30 19:38:02 -07:00
parent 6aac4af108
commit 86b89bb1d7

View File

@ -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