Skip to content

Commit 77e3a49

Browse files
author
groveer
authored
fix(client): get_node_version for powershell
1 parent 653bbdc commit 77e3a49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/copilot/client.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ function M.get_node_version()
5050
local node = config.get("copilot_node_command")
5151

5252
local cmd = node .. " --version"
53-
local cmd_output = table.concat(vim.fn.systemlist(cmd, nil, false))
53+
local cmd_output_table = vim.fn.systemlist(cmd, nil, false)
54+
local cmd_output = cmd_output_table[#cmd_output_table]
5455
local cmd_exit_code = vim.v.shell_error
5556

5657
local node_version = string.match(cmd_output, "^v(%S+)") or ""

0 commit comments

Comments
 (0)