lua: fix setup-hook *.lua matching

the setup-hook checks if a derivation contains lua files matching
lua_path patterns. We use bash's globstar extension for that but
`**.lua` doesn't return files in subfolders, it has to be `**/*.lua`.
Adjust the pattern accordingly.
This commit is contained in:
Matthieu Coudron 2024-04-02 10:48:33 +02:00
parent b8be016426
commit c55b4dbcd2
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ addToLuaSearchPathWithCustomDelimiter() {
# export only if the folder contains lua files
shopt -s globstar
for _file in ${absPattern/\?/\*\*}; do
local adjustedPattern="${absPattern/\?/\*\*\/\*}"
for _file in $adjustedPattern; do
export "${varName}=${!varName:+${!varName};}${absPattern}"
shopt -u globstar
return;