diff options
| author | Anirudh Haritas Murali <49116134+anihm136@users.noreply.github.com> | 2020-11-14 01:50:52 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-13 15:20:52 -0500 |
| commit | 24057365dae52e76d6f2afb67f99eb94b51b40fc (patch) | |
| tree | b24996f538d70843b8bb6f7823c2c5dc5ba6f193 /lua | |
| parent | 76e7fe8cb037e7944dbb13ec34362166d44e625b (diff) | |
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.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/builtin.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua index 92e78db..ed425a5 100644 --- a/lua/telescope/builtin.lua +++ b/lua/telescope/builtin.lua @@ -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 |
