diff --git a/lua/tabnine/binary.lua b/lua/tabnine/binary.lua index 8b35d4b..86f8459 100644 --- a/lua/tabnine/binary.lua +++ b/lua/tabnine/binary.lua @@ -38,6 +38,11 @@ local function binary_name() end local function binary_path() + local machine = arch_and_platform() + if not machine then + return nil -- Is this machine supported? + end + local paths = vim.tbl_map(function(path) return fn.fnamemodify(path, ":t") end, fn.glob(binaries_path .. "/*", true, true)) @@ -53,10 +58,6 @@ local function binary_path() vim.notify("Did you remember to run the build script for tabnine-nvim?", vim.log.levels.WARN) return nil -- Is it installed? end - local machine = arch_and_platform() - if not machine then - return nil -- Is this machine supported? - end local binary = binaries_path .. "/" .. tostring(version) .. "/" .. machine .. "/" .. binary_name() if vim.fn.filereadable(binary) then -- Double check that it's installed