Skip to content

Commit e611924

Browse files
fs: bubble errors, improving UX
1 parent 85df769 commit e611924

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

lib/internal/fs/glob.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,8 @@ class Glob {
433433

434434
let isDirectory = entry.isDirectory();
435435
if (entry.isSymbolicLink() && this.#followSymlinks) {
436-
try {
437-
const stat = fsStatSync(join(fullpath, entry.name));
438-
isDirectory = stat.isDirectory();
439-
} catch {
440-
// ignore
441-
}
436+
const stat = fsStatSync(join(fullpath, entry.name));
437+
isDirectory = stat.isDirectory();
442438
}
443439

444440
const subPatterns = new SafeSet();
@@ -653,12 +649,8 @@ class Glob {
653649

654650
let isDirectory = entry.isDirectory();
655651
if (entry.isSymbolicLink() && this.#followSymlinks) {
656-
try {
657-
const s = await fsStat(join(fullpath, entry.name));
658-
isDirectory = s.isDirectory();
659-
} catch {
660-
// ignore
661-
}
652+
const s = await fsStat(join(fullpath, entry.name));
653+
isDirectory = s.isDirectory();
662654
}
663655

664656
const subPatterns = new SafeSet();

0 commit comments

Comments
 (0)