mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
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
@ -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 New Issue
Block a user