Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit e832494

Browse files
Merge pull request #716 from Burgov/refer-to-docs-on-error
Tell user to read the documentation if google-services.json does not exist
2 parents 06bd6c3 + dbf48b8 commit e832494

1 file changed

Lines changed: 34 additions & 30 deletions

File tree

src/scripts/postinstall.js

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)