Skip to content

Commit 9a66765

Browse files
committed
feat(client): check node executable before setup
1 parent 8851644 commit 9a66765

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/copilot/client.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@ M.merge_server_opts = function(params)
137137
end
138138

139139
M.setup = function(params)
140+
if vim.fn.executable(params.copilot_node_command) ~= 1 then
141+
vim.notify(
142+
string.format("[copilot] copilot_node_command(%s) is not executable", params.copilot_node_command),
143+
vim.log.levels.ERROR
144+
)
145+
return
146+
end
147+
140148
M.config = M.merge_server_opts(params)
141149

142150
local augroup = vim.api.nvim_create_augroup("copilot.client", { clear = true })

0 commit comments

Comments
 (0)