Skip to content

How can I enhance the flexibility of copilot_node_command? #234

Answered by MunifTanjim
sontungexpt asked this question in Q&A
Discussion options

You must be logged in to vote

Are you sure local node_version = vim.fn.system("ls -v " .. node_dir .. " | tail -n 1") is what you expect it to be?

I think your node_version variable has a line break at the end of it. Try doing:

local node_version = vim.split(vim.fn.system("ls -v " .. node_dir .. " | tail -n 1"), "\n")[1]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MunifTanjim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants