Skip to content

Commit

Permalink
add warnings in case the binary can't be found (not installed)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondill committed Jan 12, 2024
1 parent 184bf75 commit a9bf829
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/tabnine/binary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ local function binary_path()

local version = paths[#paths]
if not version then
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()
Expand All @@ -61,6 +62,7 @@ local function binary_path()
if vim.fn.filereadable(binary) then -- Double check that it's installed
return binary
else
vim.notify("Did you remember to run the build script for tabnine-nvim?", vim.log.levels.WARN)
return nil -- File doesn't exist or isn't readable. Is it installed?
end
end
Expand Down

0 comments on commit a9bf829

Please sign in to comment.