Skip to content

Commit 60508f9

Browse files
authored
fix: error message when node --version returns nothing
1 parent f22d869 commit 60508f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/copilot/lsp/nodejs.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function M.get_node_version()
2323
if cmd_output then
2424
node_version = string.match(cmd_output, "^v(%S+)") or node_version
2525
node_version_major = tonumber(string.match(node_version, "^(%d+)%.")) or node_version_major
26+
else
27+
cmd_output = "[no output]"
2628
end
2729

2830
if node_version_major == 0 then

0 commit comments

Comments
 (0)