Skip to content

Commit ea021e0

Browse files
authored
Properly null check opts.glob when rigpgrep is not available (CopilotC-Nvim#1183)
Closes CopilotC-Nvim#1178 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
1 parent 55f2162 commit ea021e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/CopilotChat/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ M.scan_dir = async.wrap(function(path, opts, callback)
481481
vim.tbl_deep_extend('force', opts, {
482482
depth = opts.max_depth,
483483
add_dirs = false,
484-
search_pattern = M.glob_to_pattern(opts.glob),
484+
search_pattern = opts.glob and M.glob_to_pattern(opts.glob) or nil,
485485
respect_gitignore = not opts.no_ignore,
486486
on_exit = function(files)
487487
callback(filter_files(files))

0 commit comments

Comments
 (0)