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>2015-06-28 00:10:20 +0300
committerRebecca Turner <me@re-becca.org>2015-07-01 12:41:35 +0300
commit3fcf35dfb4c314e5d9643959cf1c029445c29b2e (patch)
treea00bfd2cfff1a600439a768441765a7704a07967
parent593dd33be501ff6e438b596caf8050f35eb8c49d (diff)
npm: Globally monkey-patch graceful-fs
PR-URL: https://github.com/npm/npm/pull/8735
-rw-r--r--lib/npm.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/npm.js b/lib/npm.js
index 30a42412d..8a079c21f 100644
--- a/lib/npm.js
+++ b/lib/npm.js
@@ -13,11 +13,15 @@
return
}
+ var gfs = require('graceful-fs')
+ // Patch the global fs module here at the app level
+ var fs = gfs.gracefulify(require('fs'))
+
var EventEmitter = require('events').EventEmitter
var npm = module.exports = new EventEmitter()
var npmconf = require('./config/core.js')
var log = require('npmlog')
- var fs = require('graceful-fs')
+
var path = require('path')
var abbrev = require('abbrev')
var which = require('which')