From 993a27525e3a04be54228d2ff6ae0359d6e3a4c5 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 12 May 2017 11:43:40 -0700 Subject: [PATCH] config: expand home directory in config path. --- lib/node/config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/node/config.js b/lib/node/config.js index 68267b8d..52f0b871 100644 --- a/lib/node/config.js +++ b/lib/node/config.js @@ -519,8 +519,11 @@ Config.prototype.getPrefix = function getPrefix() { var prefix = this.str('prefix'); var network; - if (prefix) + if (prefix) { + if (prefix[0] === '~') + prefix = util.HOME + prefix.substring(1); return prefix; + } prefix = util.HOME + '/.' + this.module; network = this.str('network');