diff --git a/scripts/chwd b/scripts/chwd index a4a71ce..37768ed 100755 --- a/scripts/chwd +++ b/scripts/chwd @@ -106,6 +106,11 @@ local function remove(packages) end local function exec_hook(hook) + if not hook then + print("WARNING: An unknown hook is being called") + return + end + if hook ~= "" then local file = io.popen(("/bin/bash -c '%s'"):format(hook), "r") @@ -116,8 +121,6 @@ local function exec_hook(hook) else print("ERROR: Unkown shell invocation error", hook) end - else - print("WARNING: An unknown hook is being called") end end