Skip to content

Commit

Permalink
Update ripgrep arguments for file search (#12608)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Jun 12, 2023
1 parent 44316b3 commit 6d8affb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/file-search/src/node/file-search-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ export class FileSearchServiceImpl implements FileSearchService {
return [...exactMatches, ...fuzzyMatches].slice(0, opts.limit);
}

private doFind(rootUri: URI, options: FileSearchService.BaseOptions, accept: (fileUri: string) => void, token: CancellationToken): Promise<void> {
protected doFind(rootUri: URI, options: FileSearchService.BaseOptions, accept: (fileUri: string) => void, token: CancellationToken): Promise<void> {
return new Promise((resolve, reject) => {
const cwd = FileUri.fsPath(rootUri);
const args = this.getSearchArgs(options);
const ripgrep = cp.spawn(rgPath, args, { cwd, stdio: ['pipe', 'pipe', 'inherit'] });
const ripgrep = cp.spawn(rgPath, args, { cwd });
ripgrep.on('error', reject);
ripgrep.on('exit', (code, signal) => {
if (typeof code === 'number' && code !== 0) {
Expand All @@ -159,8 +159,8 @@ export class FileSearchServiceImpl implements FileSearchService {
});
}

private getSearchArgs(options: FileSearchService.BaseOptions): string[] {
const args = ['--files', '--hidden'];
protected getSearchArgs(options: FileSearchService.BaseOptions): string[] {
const args = ['--files', '--hidden', '--case-sensitive', '--no-require-git', '--no-config'];
if (options.includePatterns) {
for (const includePattern of options.includePatterns) {
if (includePattern) {
Expand Down

0 comments on commit 6d8affb

Please sign in to comment.