summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorJose Alvarez <j.alvarez11@icloud.com>2021-06-02 06:27:32 +0900
committerGitHub <noreply@github.com>2021-06-01 23:27:32 +0200
commit5b6b23a3a275626187ad0fbd25604b126cc6de73 (patch)
tree42f132e037ff6533f3992b52e2e84a0a3baf7190 /lua
parent57ac8dcc3eb5a9bf251d6f5b9180a61e5ab170a6 (diff)
fix: correctly check output of git worktree command (#882)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin/git.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua
index ae03019..0a2d5dc 100644
--- a/lua/telescope/builtin/git.lua
+++ b/lua/telescope/builtin/git.lua
@@ -265,8 +265,8 @@ local set_opts_cwd = function(opts)
local use_git_root = utils.get_default(opts.use_git_root, true)
if ret ~= 0 then
- local is_worktree = utils.get_os_command_output({ "git", "rev-parse", "--is-inside-work-tree" }, opts.cwd)
- if is_worktree == "false" then
+ local output = utils.get_os_command_output({ "git", "rev-parse", "--is-inside-work-tree" }, opts.cwd)
+ if output[1] ~= "true" then
error(opts.cwd .. ' is not a git directory')
end
else