From 5acce4799524c6065c4e26231be4606f76064384 Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Tue, 30 Jul 2024 01:04:55 +0800 Subject: [PATCH] Fix lua-language-server --check (#2683) --- script/cli/check.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/cli/check.lua b/script/cli/check.lua index 8b314f244..c3aac0e3d 100644 --- a/script/cli/check.lua +++ b/script/cli/check.lua @@ -8,7 +8,12 @@ local util = require 'utility' local numThreads = tonumber(NUM_THREADS or 1) -local exe = arg[-1] +local exe +local minIndex = -1 +while arg[minIndex] do + exe = arg[minIndex] + minIndex = minIndex - 1 +end -- TODO: is this necessary? got it from the shell.lua helper in bee.lua tests if platform.os == 'windows' and not exe:match('%.[eE][xX][eE]$') then exe = exe..'.exe'