Skip to content

Commit ad7b637

Browse files
authored
feat(git): error handling when not inside git repo (#302)
1 parent 0e054a9 commit ad7b637

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/telescope/_extensions/file_browser/finders.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ local finders = require "telescope.finders"
1414

1515
local scan = require "plenary.scandir"
1616
local Path = require "plenary.path"
17+
local Job = require "plenary.job"
1718
local os_sep = Path.path.sep
1819

1920
local fb_finders = {}
@@ -109,7 +110,7 @@ fb_finders.browse_files = function(opts)
109110

110111
local git_file_status = {}
111112
if opts.git_status then
112-
local git_status = fb_utils.job("git", git_args(), opts.path)
113+
local git_status = Job:new({ cwd = opts.path, command = "git", args = git_args() }):sync()
113114
git_file_status = fb_git.parse_status_output(git_status, opts.cwd)
114115
end
115116
if opts.path ~= os_sep and not opts.hide_parent_dir then

0 commit comments

Comments
 (0)