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

Commit e79c9bf

Browse files
Merge pull request #352 from rosen-vladimirov/vladimirov/fix-hanging-ci-builds
Fix hanging CI builds
2 parents ae2cb78 + 02c874a commit e79c9bf

File tree

3 files changed

+40
-29
lines changed

3 files changed

+40
-29
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@
6666
},
6767
"homepage": "https://github.com/eddyverbruggen/nativescript-plugin-firebase",
6868
"dependencies": {
69-
"xcode": "0.9.2",
70-
"prompt-lite": "^0.1.1",
69+
"fs-extra": "2.1.2",
7170
"fs-promise": "^2.0.0",
72-
"nativescript-hook": "^0.2.1"
71+
"nativescript-hook": "^0.2.1",
72+
"prompt-lite": "^0.1.1",
73+
"xcode": "0.9.2"
7374
},
7475
"devDependencies": {
7576
"prompt-lite": "^0.1.1",

scripts/installer.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ function readConfig() {
3434
config = {};
3535
}
3636
}
37+
function isInteractive() {
38+
return process.stdin && process.stdin.isTTY && process.stdout && process.stdout.isTTY;
39+
}
3740

3841
// workaround for https://github.com/NativeScript/nativescript-cli/issues/2521 (2.5.0 only)
3942
var nativeScriptVersion = "";
@@ -62,6 +65,8 @@ if (process.argv.indexOf("config") === -1 && fs.existsSync(pluginConfigPath)) {
6265
console.log("***** in the node_modules/nativescript-plugin-firebase folder *****");
6366
console.log("*******************************************************************");
6467
console.log("*******************************************************************");
68+
} else if (!isInteractive()) {
69+
console.log("No existing " + pluginConfigFile + " config file found and terminal is not interactive! Default configuration will be used.");
6570
} else {
6671
console.log("No existing " + pluginConfigFile + " config file found, so let's configure the Firebase plugin!");
6772
prompt.start();
@@ -271,7 +276,7 @@ dependencies {
271276
272277
// for converting Java objects to JS
273278
compile "com.google.code.gson:gson:2.8.+"
274-
279+
275280
// for reading google-services.json and configuration
276281
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '10.2.+'
277282
compile "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
@@ -356,7 +361,7 @@ var fs = require("fs");
356361
module.exports = function() {
357362
358363
console.log("Configure firebase");
359-
var buildGradlePath = path.join(__dirname, "..", "..", "platforms", "android", "build.gradle");
364+
var buildGradlePath = path.join(__dirname, "..", "..", "platforms", "android", "build.gradle");
360365
if (fs.existsSync(buildGradlePath)) {
361366
var buildGradleContent = fs.readFileSync(buildGradlePath).toString();
362367

scripts/postinstall.js

Lines changed: 29 additions & 24 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
/***/ }),
@@ -2832,6 +2832,9 @@ function readConfig() {
28322832
config = {};
28332833
}
28342834
}
2835+
function isInteractive() {
2836+
return process.stdin && process.stdin.isTTY && process.stdout && process.stdout.isTTY;
2837+
}
28352838

28362839
// workaround for https://github.com/NativeScript/nativescript-cli/issues/2521 (2.5.0 only)
28372840
var nativeScriptVersion = "";
@@ -2860,6 +2863,8 @@ if (process.argv.indexOf("config") === -1 && fs.existsSync(pluginConfigPath)) {
28602863
console.log("***** in the node_modules/nativescript-plugin-firebase folder *****");
28612864
console.log("*******************************************************************");
28622865
console.log("*******************************************************************");
2866+
} else if (!isInteractive()) {
2867+
console.log("No existing " + pluginConfigFile + " config file found and terminal is not interactive! Default configuration will be used.");
28632868
} else {
28642869
console.log("No existing " + pluginConfigFile + " config file found, so let's configure the Firebase plugin!");
28652870
prompt.start();
@@ -3069,7 +3074,7 @@ dependencies {
30693074
30703075
// for converting Java objects to JS
30713076
compile "com.google.code.gson:gson:2.8.+"
3072-
3077+
30733078
// for reading google-services.json and configuration
30743079
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '10.2.+'
30753080
compile "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
@@ -3154,7 +3159,7 @@ var fs = require("fs");
31543159
module.exports = function() {
31553160
31563161
console.log("Configure firebase");
3157-
var buildGradlePath = path.join(__dirname, "..", "..", "platforms", "android", "build.gradle");
3162+
var buildGradlePath = path.join(__dirname, "..", "..", "platforms", "android", "build.gradle");
31583163
if (fs.existsSync(buildGradlePath)) {
31593164
var buildGradleContent = fs.readFileSync(buildGradlePath).toString();
31603165

0 commit comments

Comments
 (0)