Skip to content

A feature-rich command-line audio/video downloader

[utils] get_exe_version: encode executable name (fixes #5647)

Jaime Marquínez Ferrándiz541168039d8f
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 1013f7c187..de09b53b2d 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1380,7 +1380,7 @@ def get_exe_version(exe, args=['--version'],
or False if the executable is not present """
try:
out, _ = subprocess.Popen(
- [exe] + args,
+ [encodeArgument(exe)] + args,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()
except OSError:
return False