From df57d7a57e9f95f0d68969708c47295663c093df Mon Sep 17 00:00:00 2001 From: Justin Reichardt Date: Thu, 10 Nov 2022 16:27:47 -0600 Subject: [PATCH] Shows CombinedOutput of command to allow for debugging --- src/viddown.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/viddown.go b/src/viddown.go index 0402589..b641b73 100644 --- a/src/viddown.go +++ b/src/viddown.go @@ -137,8 +137,13 @@ func operationHandler() { cmd := exec.Command("youtube-dl", o.URL) cmd.Dir = dir + "/" currentWork[i] = o.URL // Adds the URL to list of current work - cmd.Run() + output, err := cmd.CombinedOutput() log.Print("Finished: " + o.URL) + if err != nil { + log.Print("Failed to download") + log.Print(err) + } + log.Print(string(output)) delete(currentWork, i) // Remove the URL from list of current work // Clean up directory