diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-16 23:10:52 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-17 01:59:42 -0300 |
commit | d74be10615b331aa932189343c9cf33be7feaaed (patch) | |
tree | 06832d2e697b0036572447de2adae51526a55d06 | |
parent | 614c1e410e19ca3bf5c014e359d35b74de2fe4f9 (diff) | |
download | luarocks-d74be10615b331aa932189343c9cf33be7feaaed.tar.gz luarocks-d74be10615b331aa932189343c9cf33be7feaaed.tar.bz2 luarocks-d74be10615b331aa932189343c9cf33be7feaaed.zip |
fix: sysdetect: prefer interpreter to avoid multiarch shell on macOS
Thanks @RunsFor for the suggested workaround!
Fixes #1529.
-rw-r--r-- | src/luarocks/core/sysdetect.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/core/sysdetect.lua b/src/luarocks/core/sysdetect.lua index d999203a..06454f2b 100644 --- a/src/luarocks/core/sysdetect.lua +++ b/src/luarocks/core/sysdetect.lua | |||
@@ -398,7 +398,7 @@ function sysdetect.detect(input_file) | |||
398 | if interp then | 398 | if interp then |
399 | if interp:match(dirsep) then | 399 | if interp:match(dirsep) then |
400 | -- interpreter path is absolute | 400 | -- interpreter path is absolute |
401 | table.insert(files, interp) | 401 | table.insert(files, 1, interp) |
402 | else | 402 | else |
403 | for d in (os.getenv("PATH") or ""):gmatch("[^"..PATHsep.."]+") do | 403 | for d in (os.getenv("PATH") or ""):gmatch("[^"..PATHsep.."]+") do |
404 | table.insert(files, d .. dirsep .. interp) | 404 | table.insert(files, d .. dirsep .. interp) |