Permalink
Browse files

Adding --no-bin-links option as a workaround for #2380

  • Loading branch information...
1 parent 1b5dded commit b4c58617039c21c10889a9869f8e86a23e17d3a0 @rhoot rhoot committed with isaacs Jan 24, 2013
Showing with 6 additions and 0 deletions.
  1. +3 −0 doc/cli/install.md
  2. +3 −0 lib/build.js
View
@@ -165,6 +165,9 @@ rather than locally. See `npm-folders(1)`.
The `--link` argument will cause npm to link global installs into the
local space in some cases.
+The `--no-bin-links` argument will prevent npm from creating symlinks for
+any binaries the package might contain.
+
See `npm-config(1)`. Many of the configuration params have some
effect on installation, since that's most of what npm does.
View
@@ -69,6 +69,9 @@ function writeBuiltinConf (folder, cb) {
}
function linkStuff (pkg, folder, global, didRB, cb) {
+ // allow to opt out of linking binaries.
+ if (npm.config.get("bin-links") === false) return cb()
+
// if it's global, and folder is in {prefix}/node_modules,
// then bins are in {prefix}/bin
// otherwise, then bins are in folder/../.bin

0 comments on commit b4c5861

Please sign in to comment.