From 12f5c7c689d2f9664f3f151ec4b4bf32159f4f85 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Wed, 22 Jul 2015 20:54:19 -0700 Subject: [PATCH] Fix path to ecosystem-staging.json --- appstore.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/appstore.js b/appstore.js index b85fc3a..d50fe75 100644 --- a/appstore.js +++ b/appstore.js @@ -17,7 +17,11 @@ function AppStore(origin) { accessToken: null }; - this._ecosystem = require(path.join(__dirname, '..', 'keys', 'appstore', 'ecosystem-staging.json')); + if (fs.existsSync(path.join(__dirname, 'ecosystem-staging.json'))) { + this._ecosystem = require(path.join(__dirname, 'ecosystem-staging.json')); // staging appstore + } else { + this._ecosystem = require(path.join(__dirname, '..', 'keys', 'appstore', 'ecosystem-staging.json')); + } } function verifyResponse(res, errorMessage) {