Skip to content

Commit

Permalink
feat: give better hints when failing due to bad links (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckerr committed Jul 29, 2022
1 parent 6c7d9f0 commit db6d154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filesystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Filesystem {
insertLink (p) {
const link = path.relative(fs.realpathSync(this.src), fs.realpathSync(p))
if (link.substr(0, 2) === '..') {
throw new Error(`${p}: file links out of the package`)
throw new Error(`${p}: file "${link}" links out of the package`)
}
const node = this.searchNodeFromPath(p)
node.link = link
Expand Down

0 comments on commit db6d154

Please sign in to comment.