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>2010-08-10 20:38:55 +0400
committerisaacs <i@izs.me>2010-08-10 20:40:54 +0400
commit1b070ffa98ec0c41b501a0a7f61e25348d17a9c9 (patch)
tree14cad737fa32324cc0fabba4a58dc6e55a09ff51
parent7c490f2d3a1691cf4fc038be9cdefabcd2003589 (diff)
Remove kludge for old versions
-rwxr-xr-xcli.js5
-rwxr-xr-xnpm.js9
2 files changed, 3 insertions, 11 deletions
diff --git a/cli.js b/cli.js
index b747375a0..50127442b 100755
--- a/cli.js
+++ b/cli.js
@@ -9,9 +9,8 @@ log("ok", "it worked if it ends with")
var fs = require("fs")
, path = require("path")
, sys = require("sys")
- // kludge for earlier nodes' lack of absolute module identity
- , npm = require(__dirname+"/npm")
- , ini = require(__dirname+"/lib/utils/ini")
+ , npm = require("./npm")
+ , ini = require("./lib/utils/ini")
// supported commands.
, argv = process.argv.slice(2)
diff --git a/npm.js b/npm.js
index 661fbd917..4806fa602 100755
--- a/npm.js
+++ b/npm.js
@@ -1,11 +1,3 @@
-// kludge until this is normal.
-if (!process.EventEmitter.prototype.on) {
- process.EventEmitter.prototype.on = process.EventEmitter.prototype.addListener
-}
-var path = require("path")
-if (!process.execPath) {
- process.execPath = path.join(process.installPrefix, "bin", "node")
-}
var npm = exports
, set = require("./lib/utils/set")
@@ -13,6 +5,7 @@ var npm = exports
, ini = require("./lib/utils/ini")
, log = require("./lib/utils/log")
, fs = require("fs")
+ , path = require("path")
npm.commands = {}