File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ module.exports = {
1818 getRegistry :getRegistry
1919} ;
2020
21+ var registry = null ;
22+
2123function searchForHome ( ) {
2224 var locations = [
2325 process . env . HOME ,
@@ -31,11 +33,21 @@ function searchForHome() {
3133}
3234
3335function getRegistry ( ) {
34- if ( fs . existsSync ( './.bowerrc' ) ) {
36+ if ( registry !== null ) {
37+ return registry ;
38+ }
39+
40+ if ( process . env . ADAPT_REGISTRY ) {
41+ registry = process . env . ADAPT_REGISTRY ;
42+
43+ } else if ( fs . existsSync ( './.bowerrc' ) ) {
3544 // a manifest exists; let bower determine the registry
36- return ;
45+ registry = undefined ;
46+
47+ } else {
48+ // use the default Adapt registry
49+ registry = 'http://adapt-bower-repository.herokuapp.com/' ;
3750 }
3851
39- // use the default Adapt registry
40- return 'http://adapt-bower-repository.herokuapp.com/' ;
52+ return registry ;
4153}
You can’t perform that action at this time.
0 commit comments