CB-12415 Windows build fails if start page is missing
diff --git a/template/cordova/prebuild.js b/template/cordova/prebuild.js
index 0e38f0b..a7526db 100644
--- a/template/cordova/prebuild.js
+++ b/template/cordova/prebuild.js
@@ -62,6 +62,11 @@
var startPageFilePath = shell.ls(path.join(__dirname, '..', startPage))[0];
var reBaseJs = new RegExp(escapedBasejsSrcMap[platform], 'i');
+ if (!startPageFilePath) {
+ console.warn('Warning: Start page is missing on the disk. The build must go on but note that this will cause WACK failures.');
+ return;
+ }
+
if (shell.grep(reBaseJs, startPageFilePath).length === 0) {
// 3. If it doesn't - patch page to include base.js ref before cordova.js
var appendBaseJsRe = /( *)(<script\s+(?:type="text\/javascript"\s+)?src="(.*\/)?cordova\.js">\s*<\/script>)/;