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:
Diffstat (limited to 'lib/utils/ini.js')
-rw-r--r--lib/utils/ini.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utils/ini.js b/lib/utils/ini.js
index 87890d514..95d7692b2 100644
--- a/lib/utils/ini.js
+++ b/lib/utils/ini.js
@@ -10,8 +10,14 @@ var fs = require('fs')
, http = require('http')
, log = require("./log")
, ini = require("ini")
- , crypto = require("crypto")
, sys = require("sys")
+ , crypto
+
+try {
+ crypto = require("crypto")
+} catch (ex) {
+ crypto = {}
+}
// if installed, use rhys' package explicitly
if (typeof crypto.Cipher !== "function") {