diff options
Diffstat (limited to 'lib/npm.js')
-rw-r--r-- | lib/npm.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/npm.js b/lib/npm.js index c811be5a9..666bc885f 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -424,11 +424,7 @@ Object.defineProperty(npm, "cache", }) var tmpFolder -var crypto = require("crypto") -var rand = crypto.randomBytes(6) - .toString("base64") - .replace(/\//g, '_') - .replace(/\+/, '-') +var rand = require("crypto").randomBytes(4).toString("hex") Object.defineProperty(npm, "tmp", { get : function () { if (!tmpFolder) tmpFolder = "npm-" + process.pid + "-" + rand |