Skip to content

Commit

Permalink
Remove checkGitIgnore parameter in findNonIgnoredFIles
Browse files Browse the repository at this point in the history
  • Loading branch information
Vigilans committed Sep 25, 2019
1 parent d8a8fab commit b1f675f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/workspaceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ export function resolveVariables(value: string, resourceUri?: Uri): string {
// workspace.findFiles only defaults to exclude entires in files.exclude
// so it is not even able to exclude node_modules
// Refer to: https://github.com/Microsoft/vscode/issues/48674
export async function findNonIgnoredFiles(pattern: string, checkGitIgnore: boolean = true): Promise<Uri[]> {
export async function findNonIgnoredFiles(pattern: string): Promise<Uri[]> {
let uris: Uri[] = await workspace.findFiles(pattern, `{${[
...Object.keys(await workspace.getConfiguration('search', null).get('exclude') || {}),
...Object.keys(await workspace.getConfiguration('files', null).get('exclude') || {}),
].join(',')}}`);

const workspaceFolder: WorkspaceFolder | undefined = getDefaultWorkspaceFolder();
if (checkGitIgnore && workspaceFolder) {
if (workspaceFolder) {
try { // tslint:disable-next-line: typedef
const result: string = await new Promise<string>((resolve, reject) => {
cp.exec(`git check-ignore ${uris.map((uri: Uri) => workspace.asRelativePath(uri)).join(' ')}`, {
Expand Down

0 comments on commit b1f675f

Please sign in to comment.