From aaf0fd2c445d9d3bd686702d4b644d24ed3b10f3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 5 Nov 2019 19:50:42 -0500 Subject: [PATCH] lua-5 setup hook: LUA_PATH and LUA_CPATH can be undefined --- pkgs/development/interpreters/lua-5/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/lua-5/setup-hook.sh b/pkgs/development/interpreters/lua-5/setup-hook.sh index f7e56b62ac90..1c445b82afde 100644 --- a/pkgs/development/interpreters/lua-5/setup-hook.sh +++ b/pkgs/development/interpreters/lua-5/setup-hook.sh @@ -20,7 +20,7 @@ addToLuaSearchPathWithCustomDelimiter() { if [[ ! -d "$topDir" ]]; then return; fi # export only if we haven't already got this dir in the search path - if [[ ${!varName} == *"$absPattern"* ]]; then return; fi + if [[ ${!varName-} == *"$absPattern"* ]]; then return; fi export "${varName}=${!varName:+${!varName};}${absPattern}" }