File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
cordova-lib/src/plugman/registry Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -85,20 +85,17 @@ module.exports = {
8585 fetch : function ( plugin , client ) {
8686 plugin = plugin . shift ( ) ;
8787 return Q . fcall ( function ( ) {
88+ //fetch from npm
89+ return fetchPlugin ( plugin , client , true ) ;
90+ } )
91+ . fail ( function ( error ) {
8892 //check to see if pluginID is reverse domain name style
89- if ( isValidCprName ( plugin ) ) {
90- return Q ( ) ;
93+ if ( isValidCprName ( plugin ) ) {
94+ //fetch from CPR
95+ return fetchPlugin ( plugin , client , false ) ;
9196 } else {
92- //make promise fail so it will fetch from npm
93- events . emit ( 'verbose' , 'Skipping CPR' ) ;
94- return Q . reject ( ) ;
97+ return Q . reject ( error ) ;
9598 }
96- } )
97- . then ( function ( ) {
98- return fetchPlugin ( plugin , client , false ) ;
99- } )
100- . fail ( function ( ) {
101- return fetchPlugin ( plugin , client , true ) ;
10299 } ) ;
103100 } ,
104101
You can’t perform that action at this time.
0 commit comments