--without-npm option
authorFedor Indutny <fedor.indutny@gmail.com>
Sat, 17 Dec 2011 08:09:14 +0000 (14:09 +0600)
committerRyan Dahl <ry@tinyclouds.org>
Sat, 17 Dec 2011 08:39:04 +0000 (00:39 -0800)
Fixes #2353.

configure
tools/installer.js

index 48b5b9b..1104c75 100755 (executable)
--- a/configure
+++ b/configure
@@ -23,6 +23,11 @@ parser.add_option("--prefix",
     dest="prefix",
     help="Select the install prefix (defaults to /usr/local)")
 
+parser.add_option("--without-npm",
+    action="store_true",
+    dest="without_npm",
+    help="Don\'t install the bundled npm package manager")
+
 parser.add_option("--without-ssl",
     action="store_true",
     dest="without_ssl",
@@ -162,6 +167,7 @@ def configure_node(o):
   o['variables']['node_debug'] = b(options.debug)
   o['variables']['node_prefix'] = options.prefix if options.prefix else ''
   o['variables']['node_use_dtrace'] = b(options.with_dtrace)
+  o['variables']['node_install_npm'] = b(not options.without_npm)
   o['variables']['host_arch'] = host_arch()
   o['variables']['target_arch'] = target_arch()
 
index 1adfc8e..ef2f883 100644 (file)
@@ -95,7 +95,7 @@ if (cmd === 'install') {
   copy('out/Release/node', 'bin/node');
 
   // Install npm (eventually)
-  if (variables.node_install_npm) {
+  if (variables.node_install_npm == 'true') {
     copy('deps/npm', 'lib/node_modules/npm');
     queue.push('ln -sF ../lib/node_modules/npm/bin/npm-cli.js ' +
                path.join(node_prefix, 'bin/npm'));