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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-08-02 03:09:48 +0400
committerisaacs <i@izs.me>2012-08-02 03:09:48 +0400
commitecb82ffa84767f24f6b2c6cb614c57b878a361bf (patch)
treefdf6dd81207e4f9090b8220a492c8fe2ba4c19f9 /node_modules/node-gyp/lib/node-gyp.js
parent23dac350607690901c5647eb951e6b43c8897aa1 (diff)
node-gyp@0.6.3
Diffstat (limited to 'node_modules/node-gyp/lib/node-gyp.js')
-rw-r--r--node_modules/node-gyp/lib/node-gyp.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/node_modules/node-gyp/lib/node-gyp.js b/node_modules/node-gyp/lib/node-gyp.js
index 6681daafe..26c8beb64 100644
--- a/node_modules/node-gyp/lib/node-gyp.js
+++ b/node_modules/node-gyp/lib/node-gyp.js
@@ -146,11 +146,9 @@ proto.parseArgv = function parseOpts (argv) {
if (name === npm_config_prefix + 'loglevel') {
log.level = val
} else {
- // take the config name and check if it's one that node-gyp cares about
+ // add the user-defined options to the config
name = name.substring(npm_config_prefix.length)
- if (name in this.configDefs) {
- this.opts[name] = val
- }
+ this.opts[name] = val
}
}, this)
@@ -176,10 +174,10 @@ proto.spawn = function spawn (command, args, opts) {
}
/**
- * Prints the usage instructions and then exits.
+ * Returns the usage instructions for node-gyp.
*/
-proto.usageAndExit = function usageAndExit () {
+proto.usage = function usage () {
var usage = [
''
, ' Usage: node-gyp <command> [options]'
@@ -195,13 +193,11 @@ proto.usageAndExit = function usageAndExit () {
, 'node-gyp@' + this.version + ' ' + path.resolve(__dirname, '..')
, 'node@' + process.versions.node
].join('\n')
-
- console.log(usage)
- process.exit(4)
+ return usage
}
/**
- * Version number proxy.
+ * Version number getter.
*/
Object.defineProperty(proto, 'version', {