Skip to content

Commit db6d154

Browse files
authored
feat: give better hints when failing due to bad links (#241)
1 parent 6c7d9f0 commit db6d154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/filesystem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Filesystem {
9898
insertLink (p) {
9999
const link = path.relative(fs.realpathSync(this.src), fs.realpathSync(p))
100100
if (link.substr(0, 2) === '..') {
101-
throw new Error(`${p}: file links out of the package`)
101+
throw new Error(`${p}: file "${link}" links out of the package`)
102102
}
103103
const node = this.searchNodeFromPath(p)
104104
node.link = link

0 commit comments

Comments
 (0)