Skip to content

Commit

Permalink
#796 - Return error in output
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Apr 23, 2024
1 parent f46e499 commit 60952a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/commands/Folders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,12 @@ export class Folders {
private static async findFiles(pattern: string): Promise<Uri[]> {
return new Promise((resolve) => {
glob(pattern, { ignore: '**/node_modules/**' }, (err, files) => {
const allFiles = files.map((file) => Uri.file(file));
if (err) {
Logger.error(`Folders:findFiles: ${err}`);
resolve([]);
}

const allFiles = (files || []).map((file) => Uri.file(file));
resolve(allFiles);
});
});
Expand Down

0 comments on commit 60952a0

Please sign in to comment.