Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsmikes <smikes@cubane.com>2014-12-20 15:53:48 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-03-06 06:49:48 +0300
commitc618eeda3e321fd454d77c476b53a0330f2344cc (patch)
treefb07ad8e891781a9b05329c1cf8066fc6b5e8750 /lib
parent7ea564ab4065f77e49f42cb057f4000f21124a9c (diff)
install: don't try to --link git dependencies
test sets up git repo & mock registry -- fragile test of install --link=false test of install --link=true
Diffstat (limited to 'lib')
-rw-r--r--lib/install.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/install.js b/lib/install.js
index b79987147..acfc2aeb7 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -868,8 +868,10 @@ function targetResolver (where, context, deps) {
function installOne (target, where, context, cb) {
// the --link flag makes this a "link" command if it's at the
// the top level.
+ var isGit = npa(target._resolved).type === "git"
+
if (where === npm.prefix && npm.config.get("link")
- && !npm.config.get("global")) {
+ && !npm.config.get("global") && !isGit) {
return localLink(target, where, context, cb)
}
installOne_(target, where, context, function (er, installedWhat) {