diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index a9b83dfc48899ca4cff83d64d97dbd40c258d764..63ead1b1f9be8b7d12d4aab449307f89dfc3b463 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -41,6 +41,14 @@ export class RipgrepEngine { // TODO@Rob - make promise-based once the old search is gone, and I don't need them to have matching interfaces anymore search(onResult: (match: ISerializedFileMatch) => void, onMessage: (message: ISearchLog) => void, done: (error: Error, complete: ISerializedSearchComplete) => void): void { + if (!this.config.folderQueries.length) { + done(null, { + limitHit: false, + stats: null + }); + return; + } + const rgArgs = getRgArgs(this.config); if (rgArgs.siblingClauses) { this.postProcessExclusions = glob.parseToAsync(rgArgs.siblingClauses, { trimForExclusions: true });