From 4d56339756841304706b7dcd13fcd0f8949584df Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Thu, 30 Jul 2020 13:05:49 -0400 Subject: [PATCH] fixed appending args --- downloader/downloader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloader/downloader.go b/downloader/downloader.go index ed8e6b6..c8500f1 100644 --- a/downloader/downloader.go +++ b/downloader/downloader.go @@ -255,7 +255,7 @@ func run(use string, args []string, withStdErr, withStdOut bool, stopChan stop.C defer pool.ReleaseIP(sourceAddress) argsForCommand := append(args, "--source-address", sourceAddress) cmd := exec.Command("youtube-dl", argsForCommand...) - logrus.Printf("Running command youtube-dl %s", strings.Join(args, " ")) + logrus.Printf("Running command youtube-dl %s", strings.Join(argsForCommand, " ")) var stderr io.ReadCloser var errorLog []byte @@ -314,7 +314,7 @@ func run(use string, args []string, withStdErr, withStdOut bool, stopChan stop.C continue } logrus.Debug("Unkown error, returning failure") - return nil, errors.Prefix("youtube-dl "+strings.Join(args, " "), err) + return nil, errors.Prefix("youtube-dl "+strings.Join(argsForCommand, " "), err) } return strings.Split(strings.Replace(string(outLog), "\r\n", "\n", -1), "\n"), nil }