Skip to content

Commit

Permalink
#79 & #78: registry fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster committed Oct 9, 2017
1 parent c742e51 commit 3feb86c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ function searchForHome() {

function getRegistry() {
if (process.env.ADAPT_REGISTRY) return process.env.ADAPT_REGISTRY;
if (fs.existsSync('./.bowerrc')) return bower.config.registry.publish;
if (fs.existsSync('./.bowerrc')) {
return JSON.parse(fs.readFileSync('./.bowerrc').toString()).registry;
}
if (fs.existsSync('../../.bowerrc')) {
return JSON.parse(fs.readFileSync('../../.bowerrc').toString()).registry;
}
return 'http://adapt-bower-repository.herokuapp.com/';
}

0 comments on commit 3feb86c

Please sign in to comment.