Skip to content

Commit

Permalink
fix: checkhealth after checksum changes
Browse files Browse the repository at this point in the history
Related to #669
  • Loading branch information
Saghen committed Dec 20, 2024
1 parent ca05bb3 commit d8ffbe9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/blink/cmp/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function health.check()
end

-- check if os is supported
local download = require('blink.cmp.fuzzy.download.system')
local system_triple = download.get_triple_sync()
local download_system = require('blink.cmp.fuzzy.download.system')
local system_triple = download_system.get_triple_sync()
if system_triple then
vim.health.ok('Your system is supported by pre-built binaries (' .. system_triple .. ')')
else
Expand All @@ -23,10 +23,9 @@ function health.check()
)
end

if
vim.uv.fs_stat(download.lib_path)
or vim.uv.fs_stat(string.gsub(download.lib_path, 'libblink_cmp_fuzzy', 'blink_cmp_fuzzy'))
then
local download_files = require('blink.cmp.fuzzy.download.files')
local lib_path_without_prefix = string.gsub(download_files.lib_path, 'libblink_cmp_fuzzy', 'blink_cmp_fuzzy')

This comment has been minimized.

Copy link
@the-fuckin-nobody

the-fuckin-nobody Dec 20, 2024

wouldn't this still result in that same error ?
Sorry, if I'm wrong.

This comment has been minimized.

Copy link
@Saghen

Saghen Dec 20, 2024

Author Owner

It returns it as a second return value so we should be all good!

local lib_path_without_prefix, num_of_matches = string.gsub(...)

if vim.uv.fs_stat(download_files.lib_path) or vim.uv.fs_stat(lib_path_without_prefix) then
vim.health.ok('blink_cmp_fuzzy lib is downloaded/built')
else
vim.health.warn('blink_cmp_fuzzy lib is not downloaded/built')
Expand Down

0 comments on commit d8ffbe9

Please sign in to comment.