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>2011-06-15 20:10:20 +0400
committerisaacs <i@izs.me>2011-06-15 20:10:20 +0400
commit76c1fe013f44d9b9fe6133f544e033ffc0357d44 (patch)
treedb5b49a6fb6321d62e6764c26dc9c26b52bfe9e2
parent9bf207f536330948b200faaf986bd5f94028971b (diff)
Close #1032 Don't try to read from null
-rw-r--r--lib/utils/excludes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/excludes.js b/lib/utils/excludes.js
index 08d186946..f12f15bc0 100644
--- a/lib/utils/excludes.js
+++ b/lib/utils/excludes.js
@@ -37,7 +37,7 @@ function readIgnoreFile (file, gitBase, cb) {
//log.warn(file, "ignoreFile")
if (!file) return cb(null, "")
fs.readFile(file, function (er, data) {
- if (!er) return cb(null, data || "")
+ if (!er || !gitBase) return cb(null, data || "")
var gitFile = path.resolve(path.dirname(file), gitBase)
fs.readFile(gitFile, function (er, data) {
return cb(null, data || "")