diff options
Diffstat (limited to 'lib/install/node.js')
-rw-r--r-- | lib/install/node.js | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/install/node.js b/lib/install/node.js index 64414659d..305f705ef 100644 --- a/lib/install/node.js +++ b/lib/install/node.js @@ -18,10 +18,10 @@ var defaultTemplate = { realpath: null, location: null, userRequired: false, - existing: false, save: false, saveSpec: null, - isTop: false + isTop: false, + fromBundle: false } function isLink (node) { @@ -38,8 +38,21 @@ var create = exports.create = function (node, template) { if (node[key] != null) return node[key] = template[key] }) - if (isLink(node.parent)) { - node.isLink = true + if (node.package) { + // isLink is true for the symlink and everything inside it. + // by contrast, isInLink is true for only the things inside a link + if (node.isLink == null && isLink(node.parent)) { + node.isLink = true + node.isInLink = true + } else if (node.isLink == null) { + node.isLink = false + node.isInLink = false + } + if (node.fromBundle == null && node.package) { + node.fromBundle = node.package._inBundle + } else if (node.fromBundle == null) { + node.fromBundle = false + } } return node } |