Skip to content

Commit c050733

Browse files
Jingkan HeCopilot
andauthored
Update cli/src/utils/annotations.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c7dadc3 commit c050733

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cli/src/utils/annotations.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,14 @@ class FileAnnotationStore implements AnnotationStore {
8888
}
8989
}
9090
return results;
91-
} catch {
92-
return [];
91+
} catch (error: unknown) {
92+
const err = error as NodeJS.ErrnoException;
93+
if (err && err.code === 'ENOENT') {
94+
// Treat missing annotations directory as "no annotations".
95+
return [];
96+
}
97+
// Surface other I/O errors so callers can diagnose issues.
98+
throw error;
9399
}
94100
}
95101
}

0 commit comments

Comments
 (0)