Skip to content

Commit

Permalink
feat(git): error handling when not inside git repo (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestrew committed Aug 13, 2023
1 parent 0e054a9 commit ad7b637
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/telescope/_extensions/file_browser/finders.lua
Expand Up @@ -14,6 +14,7 @@ local finders = require "telescope.finders"

local scan = require "plenary.scandir"
local Path = require "plenary.path"
local Job = require "plenary.job"
local os_sep = Path.path.sep

local fb_finders = {}
Expand Down Expand Up @@ -109,7 +110,7 @@ fb_finders.browse_files = function(opts)

local git_file_status = {}
if opts.git_status then
local git_status = fb_utils.job("git", git_args(), opts.path)
local git_status = Job:new({ cwd = opts.path, command = "git", args = git_args() }):sync()
git_file_status = fb_git.parse_status_output(git_status, opts.cwd)
end
if opts.path ~= os_sep and not opts.hide_parent_dir then
Expand Down

0 comments on commit ad7b637

Please sign in to comment.