From a5a8e3a5f301e6d10bdb5b0bdd8882f8ac3b46b2 Mon Sep 17 00:00:00 2001 From: Tangent Date: Sat, 13 Jan 2024 15:43:04 -0700 Subject: [PATCH] guard against yt-dlp missing, better helptext --- video-dl.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/video-dl.lua b/video-dl.lua index eef505f..a33b7e3 100644 --- a/video-dl.lua +++ b/video-dl.lua @@ -2,7 +2,7 @@ local helptext = [[Usage: - ./video-dl.lua [action] + video-dl.lua [action] [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