tzachar / cmp-tabnine

TabNine plugin for hrsh7th/nvim-cmp
MIT License
287 stars 28 forks source link

'uname' command is not usually available in Windows #49

Closed adolfocorreia closed 2 years ago

adolfocorreia commented 2 years ago

I get the following error in my Windows 10 machine during the plugin initialization:

Error executing vim.schedule lua callback: Vim:E475: Invalid value for argument cmd: 'uname' is not executable
stack traceback:
        [C]: in function 'system'
        ...e\pack\packer\opt\cmp-tabnine/lua/cmp_tabnine/source.lua:110: in function 'binary'
        ...e\pack\packer\opt\cmp-tabnine/lua/cmp_tabnine/source.lua:229: in function '_on_exit'
        ...e\pack\packer\opt\cmp-tabnine/lua/cmp_tabnine/source.lua:135: in function 'new'
        ...ite\pack\packer\opt\cmp-tabnine/lua/cmp_tabnine/init.lua:8: in function <...ite\pack\packer\opt\cmp-tabnine/lua/cmp_tabnine/init.lua:7>

As far as I know, the 'uname' command is only available on UNIX-like OSes and does not exist on Windows machines. It is probably a good idea to check for the OS before calling this command.

tzachar commented 2 years ago

10x