From a9d756932b59ad74f4febc84a6f030453564d488 Mon Sep 17 00:00:00 2001 From: garret Date: Sun, 20 Nov 2022 05:18:58 +0000 Subject: feedmaker: print errors to stderr --- make-feed.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'make-feed.lua') diff --git a/make-feed.lua b/make-feed.lua index 07f3609..9de86eb 100755 --- a/make-feed.lua +++ b/make-feed.lua @@ -62,8 +62,8 @@ local function get_files(path) local absolute = clean_path(path, file) if file == "." or file == ".." then -- silently skip dir and 1-level-up dir elseif pcall(lfs.dir, absolute) then file = join_tables(files, get_files(absolute)) -- search recursively - elseif extension ~= "lua" then print(absolute .. ": not a lua file, skipping") - elseif not valid_namespace(name) then print(absolute .. ": invalid namespace, skipping") + elseif extension ~= "lua" then io.stderr:write(absolute .. ": not a lua file, skipping\n") + elseif not valid_namespace(name) then io.stderr:write(absolute .. ": invalid namespace, skipping\n") else table.insert(files, absolute) end end return files -- cgit v1.2.3-70-g09d2