@@ -2730,28 +2730,28 @@ function read (opts, cb) {
27302730 \***********************************/
27312731/***/ ( function ( module , exports ) {
27322732
2733- module . exports = function ( module ) {
2734- if ( ! module . webpackPolyfill ) {
2735- module . deprecate = function ( ) { } ;
2736- module . paths = [ ] ;
2737- // module.parent = undefined by default
2738- if ( ! module . children ) module . children = [ ] ;
2739- Object . defineProperty ( module , "loaded" , {
2740- enumerable : true ,
2741- get : function ( ) {
2742- return module . l ;
2743- }
2744- } ) ;
2745- Object . defineProperty ( module , "id" , {
2746- enumerable : true ,
2747- get : function ( ) {
2748- return module . i ;
2749- }
2750- } ) ;
2751- module . webpackPolyfill = 1 ;
2752- }
2753- return module ;
2754- } ;
2733+ module . exports = function ( module ) {
2734+ if ( ! module . webpackPolyfill ) {
2735+ module . deprecate = function ( ) { } ;
2736+ module . paths = [ ] ;
2737+ // module.parent = undefined by default
2738+ if ( ! module . children ) module . children = [ ] ;
2739+ Object . defineProperty ( module , "loaded" , {
2740+ enumerable : true ,
2741+ get : function ( ) {
2742+ return module . l ;
2743+ }
2744+ } ) ;
2745+ Object . defineProperty ( module , "id" , {
2746+ enumerable : true ,
2747+ get : function ( ) {
2748+ return module . i ;
2749+ }
2750+ } ) ;
2751+ module . webpackPolyfill = 1 ;
2752+ }
2753+ return module ;
2754+ } ;
27552755
27562756
27572757/***/ } ) ,
@@ -3422,17 +3422,21 @@ module.exports = function($logger, $projectData, hookArgs) {
34223422 if (hookArgs.platform.toLowerCase() === 'android') {
34233423 var sourceGoogleJson = path.join($projectData.appResourcesDirectoryPath, "Android", "google-services.json");
34243424 var destinationGoogleJson = path.join($projectData.platformsDir, "android", "app", "google-services.json");
3425- if (fs.existsSync(sourceGoogleJson) && fs.existsSync(path.dirname(destinationGoogleJson))) {
3426- $logger.out("Copy " + sourceGoogleJson + " to " + destinationGoogleJson + ".");
3427- fs.writeFileSync(destinationGoogleJson, fs.readFileSync(sourceGoogleJson));
3428- resolve()
3429- } else {
3425+ if (!fs.existsSync(sourceGoogleJson)) {
3426+ $logger.warn(sourceGoogleJson + " does not exist. Please follow the installation instructions from the documentation");
3427+ return reject();
3428+ }
3429+
3430+ if (!fs.existsSync(path.dirname(destinationGoogleJson))) {
34303431 $logger.warn("Unable to copy google-services.json.");
3431- reject();
3432+ return reject();
34323433 }
3433- } else {
3434- resolve()
3434+
3435+ $logger.out("Copy " + sourceGoogleJson + " to " + destinationGoogleJson + ".");
3436+ fs.writeFileSync(destinationGoogleJson, fs.readFileSync(sourceGoogleJson));
34353437 }
3438+
3439+ resolve()
34363440 });
34373441};
34383442` ;
0 commit comments