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-12-02 02:57:44 +0400
committerisaacs <i@izs.me>2011-12-02 02:57:44 +0400
commit124f9668eab3e1fff77095aab7b7bd7ad258d283 (patch)
treeb2086867a092932f1dddc38795d2e6cbb8578796
parent57e8ae5400abcb68346c25729767e4694c8fc163 (diff)
Move envReplace to the parseField instead of ini.get method
-rw-r--r--lib/utils/ini.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/ini.js b/lib/utils/ini.js
index 85aa28d23..7d7d4680e 100644
--- a/lib/utils/ini.js
+++ b/lib/utils/ini.js
@@ -200,6 +200,8 @@ function parseField (f, k, emptyIsFalse) {
case "undefined": return undefined
}
+ f = envReplace(f)
+
if (isPath) {
if (f.substr(0, 2) === "~/" && process.env.HOME) {
f = path.resolve(process.env.HOME, f.substr(2))
@@ -329,7 +331,7 @@ function snapshot (which) {
}
function get (key, which) {
return (!key) ? snapshot(which)
- : (!which) ? envReplace(configList.get(key)) // resolved
+ : (!which) ? configList.get(key) // resolved
: configList.list[TRANS[which]]
? envReplace(configList.list[TRANS[which]][key])
: undefined