We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e74ab7a commit 7dcf13eCopy full SHA for 7dcf13e
src/commands/fix/coana-fix.mts
@@ -85,9 +85,13 @@ async function discoverGhsaIds(
85
86
if (foundCResult.ok) {
87
// Coana prints ghsaIds as json-formatted string on the final line of the output
88
- const foundIds = JSON.parse(
89
- foundCResult.data.trim().split('\n').pop() || '[]',
90
- )
+ const foundIds: string[] = []
+ try {
+ const ghsaIdsRaw = foundCResult.data.trim().split('\n').pop()
91
+ if (ghsaIdsRaw) {
92
+ foundIds.push(...JSON.parse(ghsaIdsRaw))
93
+ }
94
+ } catch {}
95
return limit !== undefined ? foundIds.slice(0, limit) : foundIds
96
}
97
return []
0 commit comments