From d74be10615b331aa932189343c9cf33be7feaaed Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 16 Feb 2024 23:10:52 -0300 Subject: fix: sysdetect: prefer interpreter to avoid multiarch shell on macOS Thanks @RunsFor for the suggested workaround! Fixes #1529. --- src/luarocks/core/sysdetect.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) if interp then if interp:match(dirsep) then -- interpreter path is absolute - table.insert(files, interp) + table.insert(files, 1, interp) else for d in (os.getenv("PATH") or ""):gmatch("[^"..PATHsep.."]+") do table.insert(files, d .. dirsep .. interp) -- cgit v1.2.3-55-g6feb