1 parent 6883998 commit 329db44Copy full SHA for 329db44
1 file changed
skill/dependency-cve-audit/audit.mjs
@@ -328,8 +328,9 @@ async function main() {
328
const isMain = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)
329
if (isMain) {
330
main().catch((error) => {
331
- const cause = error?.cause
332
- ? `\nCaused by: ${cause.stack ?? cause.code ?? cause.message ?? String(cause)}`
+ const nested = error?.cause
+ const cause = nested
333
+ ? `\nCaused by: ${nested.stack ?? nested.code ?? nested.message ?? String(nested)}`
334
: ""
335
process.stderr.write(`${error.stack ?? error.message}${cause}\n`)
336
process.exitCode = 1
0 commit comments