From 83058eae268a25a3cdd53af00ffd9f9ae3125113 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 20 Oct 2015 14:56:09 -0400 Subject: [PATCH] Only use local install if config file exists. --- lib/cli/bitcore.js | 8 ++++---- lib/cli/bitcored.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/cli/bitcore.js b/lib/cli/bitcore.js index 963d3b24..3ea4771d 100644 --- a/lib/cli/bitcore.js +++ b/lib/cli/bitcore.js @@ -23,12 +23,12 @@ function main(parentServicesPath, additionalServices) { }, function(env){ var node; - if (typeof env.modulePath === 'undefined') { - node = require('../../'); - node.cli.main(parentServicesPath, additionalServices); - } else { + if (env.configPath && env.modulePath) { node = require(env.modulePath); node.cli.main(); + } else { + node = require('../../'); + node.cli.main(parentServicesPath, additionalServices); } }); diff --git a/lib/cli/bitcored.js b/lib/cli/bitcored.js index 731311f7..158b2ee7 100644 --- a/lib/cli/bitcored.js +++ b/lib/cli/bitcored.js @@ -24,12 +24,12 @@ function main(parentServicesPath, additionalServices) { var node; - if (typeof env.modulePath === 'undefined') { - node = require('../../'); - node.cli.daemon(parentServicesPath, additionalServices); - } else { + if (env.configPath && env.modulePath) { node = require(env.modulePath); node.cli.daemon(); + } else { + node = require('../../'); + node.cli.daemon(parentServicesPath, additionalServices); } });