Merge #295012: lua: actually fix longstanding bug in lua envHook
..causing relative module imports to stop working. Merge into staging
This commit is contained in:
commit
d6cd575b84
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,11 @@ addToLuaSearchPathWithCustomDelimiter() {
|
|||
# export only if we haven't already got this dir in the search path
|
||||
if [[ ${!varName-} == *"$absPattern"* ]]; then return; fi
|
||||
|
||||
# if the path variable has not yet been set, initialize it to ";;"
|
||||
# this is a magic value that will be replaced by the default,
|
||||
# allowing relative modules to be used even when there are system modules.
|
||||
if [[ ! -v "${varName}" ]]; then export "${varName}=;;"; fi
|
||||
|
||||
export "${varName}=${!varName:+${!varName};}${absPattern}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue