fix(init): guard read_file_lines against directory paths (#190)
This commit is contained in:
parent
925ba5cb8a
commit
a1af48833b
2 changed files with 36 additions and 0 deletions
|
|
@ -347,6 +347,9 @@ end
|
|||
---@param path string
|
||||
---@return string[]?
|
||||
local function read_file_lines(path)
|
||||
if vim.fn.isdirectory(path) == 1 then
|
||||
return nil
|
||||
end
|
||||
local f = io.open(path, 'r')
|
||||
if not f then
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue