From 1a6547231efc0231cd357060a84e7e47205dd891 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Mon, 1 Apr 2024 09:08:42 +0200 Subject: Fix `lpm.run` not returning executor function --- src/lpm.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lpm.lua b/src/lpm.lua index cb08fef..d1155e4 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -2178,6 +2178,8 @@ function lpm.run(ARGS) error("unknown command: " .. ARGS[2]) elseif result == true and JSON then io.stdout:write(json.encode({ actions = actions, warnings = warnings })) + else + return result end end -- cgit v1.2.3 From 411825175667285b39cc54cfe0efd26105c92520 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Mon, 1 Apr 2024 09:20:25 +0200 Subject: Only return functions from `lpm.run` --- src/lpm.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lpm.lua b/src/lpm.lua index d1155e4..a4cb851 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -2178,7 +2178,7 @@ function lpm.run(ARGS) error("unknown command: " .. ARGS[2]) elseif result == true and JSON then io.stdout:write(json.encode({ actions = actions, warnings = warnings })) - else + elseif type(result) == "function" then return result end end -- cgit v1.2.3