Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit 5b6b6ca

Browse files
committed
fix: ensure index path exists before reading
This changeset ensures the index.json exists before trying to read it. When first fetching the `registry.json` would get created but not the `index.json` and an error would be thrown. Instead of creating `index.json` we just check for it.
1 parent 927f937 commit 5b6b6ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/nvim-devdocs/list.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ end
4646

4747
M.get_updatable = function()
4848
if not registery_path:exists() then return {} end
49+
if not index_path:exists() then return {} end
4950

5051
local results = {}
5152
local registery_content = registery_path:read()

0 commit comments

Comments
 (0)