guard against yt-dlp missing, better helptext

This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-01-13 15:43:04 -07:00
parent 984af012bf
commit a5a8e3a5f3

View File

@ -2,7 +2,7 @@
local helptext = [[Usage:
./video-dl.lua [action] <url>
video-dl.lua [action] <url>
[action]: What is desired.
video (default): Highest quality video (maximum 720p).
@ -16,6 +16,10 @@ local helptext = [[Usage:
yt-dlp works with.
]]
if os.execute("where yt-dlp") ~= 0 then
error("yt-dlp must be installed and in the path (accessible to CMD.exe)")
end
local action, url
if #arg < 2 then