Skip to content

Commit d898b9b

Browse files
committed
fix: handle difference in error attributes between rpjf and package-json
1 parent 7a52976 commit d898b9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

workspaces/arborist/lib/arborist/load-actual.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ module.exports = cls => class ActualLoader extends cls {
285285
params.overrides = root.overrides.getNodeRule({ name: pkg.name, version: pkg.version })
286286
}
287287
} catch (err) {
288+
if (err.code === 'EJSONPARSE') {
289+
err.path = join(real, 'package.json')
290+
}
288291
params.error = err
289292
}
290293

0 commit comments

Comments
 (0)