@@ -11,10 +11,10 @@ local function logFileForThread(threadId)
11
11
return LOGPATH .. ' /check-partial-' .. threadId .. ' .json'
12
12
end
13
13
14
- local function buildArgs (exe , numThreads , threadId , format , quiet )
15
- local args = {exe }
14
+ local function buildArgs (minIndex , numThreads , threadId , format , quiet )
15
+ local args = {}
16
16
local skipNext = false
17
- for i = 1 , # arg do
17
+ for i = minIndex , # arg do
18
18
local arg = arg [i ]
19
19
-- --check needs to be transformed into --check_worker
20
20
if arg :lower ():match (' ^%-%-check$' ) or arg :lower ():match (' ^%-%-check=' ) then
@@ -56,9 +56,10 @@ function export.runCLI()
56
56
exe = arg [minIndex ]
57
57
minIndex = minIndex - 1
58
58
end
59
+ minIndex = minIndex + 1
59
60
-- TODO: is this necessary? got it from the shell.lua helper in bee.lua tests
60
61
if platform .os == ' windows' and not exe :match (' %.[eE][xX][eE]$' ) then
61
- exe = exe .. ' .exe'
62
+ arg [ minIndex ] = exe .. ' .exe'
62
63
end
63
64
64
65
if not QUIET and numThreads > 1 then
@@ -67,7 +68,7 @@ function export.runCLI()
67
68
68
69
local procs = {}
69
70
for i = 1 , numThreads do
70
- local process , err = subprocess .spawn ({buildArgs (exe , numThreads , i , CHECK_FORMAT , QUIET )})
71
+ local process , err = subprocess .spawn ({buildArgs (minIndex , numThreads , i , CHECK_FORMAT , QUIET )})
71
72
if err then
72
73
print (err )
73
74
end
0 commit comments