Skip to content

Commit 9018914

Browse files
author
Rónán Carrigan
committed
fix(command): evaluate unquoated string args
See #297
1 parent da628ed commit 9018914

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugin/neotest.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ commands = {
133133
}
134134

135135
local function eval_luastring(value)
136-
return loadstring("return " .. value, value)()
136+
local evaluated = loadstring("return " .. value, value)()
137+
if evaluated == nil then
138+
-- Treat as unquoted string
139+
evaluated = value
140+
end
141+
return evaluated
137142
end
138143

139144
local function make_params(info, args)

0 commit comments

Comments
 (0)