Fix path to ecosystem-staging.json

This commit is contained in:
Girish Ramakrishnan 2015-07-22 20:54:19 -07:00
parent 996f529cbb
commit 12f5c7c689
1 changed files with 5 additions and 1 deletions

View File

@ -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) {