lua-5 setup hook: LUA_PATH and LUA_CPATH can be undefined

This commit is contained in:
John Ericson 2019-11-05 19:50:42 -05:00
parent 0b90a7f67f
commit aaf0fd2c44

View file

@ -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}"
}