From cb72c408280eea6af7c7abb8ee96b0f05e2225cf Mon Sep 17 00:00:00 2001 From: Alex Povel Date: Fri, 30 Oct 2020 15:21:18 +0100 Subject: [PATCH] Check if env var is empty (if it does exists but unset) Idea from https://github.com/lsangild/ITAMS/blob/d23841b09ff5eab38dd533aa2428ca9f25557d24/Report/texsetup/lua/utility.lua --- lib/lua/envvar_newcommands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lua/envvar_newcommands.lua b/lib/lua/envvar_newcommands.lua index 24b2c10..564f737 100644 --- a/lib/lua/envvar_newcommands.lua +++ b/lib/lua/envvar_newcommands.lua @@ -30,7 +30,7 @@ local macros_to_envvars = { for macro_name, env_var in pairs(macros_to_envvars) do local content = os.getenv(env_var) - if content == nil then + if content == nil or content == "" then content = missing end --[[