From 2e33082f0bc058aea30f77a20aaa19f18ee05e5f Mon Sep 17 00:00:00 2001 From: indexzero Date: Sat, 22 Oct 2011 02:36:45 -0400 Subject: [PATCH] [api] Automatically search for a file if `options.search` is true in File store --- lib/nconf/stores/file.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/nconf/stores/file.js b/lib/nconf/stores/file.js index b18ea24..4e88912 100644 --- a/lib/nconf/stores/file.js +++ b/lib/nconf/stores/file.js @@ -28,6 +28,10 @@ var File = exports.File = function (options) { this.file = options.file; this.dir = options.dir || process.cwd(); this.format = options.format || formats.json; + + if (options.search) { + this.search(this.dir); + } }; // Inherit from the Memory store