Fix git files in non-git directories (#239)
0 is not a false value in Lua. Compare to 1 to check if it is a git directory. Fixed error syntax.
This commit is contained in:
committed by
GitHub
parent
76e7fe8cb0
commit
24057365da
@@ -53,8 +53,8 @@ builtin.git_files = function(opts)
|
||||
--- Find root of git directory and remove trailing newline characters
|
||||
opts.cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
|
||||
if not vim.fn.isdirectory(opts.cwd) then
|
||||
error("Not a working directory for git_files:", opts.cwd)
|
||||
if 1 ~= vim.fn.isdirectory(opts.cwd) then
|
||||
error("Not a working directory for git_files:" .. opts.cwd)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user