From db6d1541be05f67933f07c6f30d2425a05f13182 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 29 Jul 2022 11:21:17 -0500 Subject: [PATCH] feat: give better hints when failing due to bad links (#241) --- lib/filesystem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filesystem.js b/lib/filesystem.js index 85e1eb0..552055e 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -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