You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2017/02/07 12:44:13 UTC

[3/4] cordova-windows git commit: CB-12415 Windows build fails if start page is missing

CB-12415 Windows build fails if start page is missing


Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/ba9e3513
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/ba9e3513
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/ba9e3513

Branch: refs/heads/5.0.x
Commit: ba9e3513bbedcfd19a93c9924ee9e217606a169b
Parents: 04ffbeb
Author: daserge <v-...@microsoft.com>
Authored: Thu Feb 2 11:19:56 2017 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Tue Feb 7 15:43:38 2017 +0300

----------------------------------------------------------------------
 template/cordova/prebuild.js | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/ba9e3513/template/cordova/prebuild.js
----------------------------------------------------------------------
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 @@ module.exports = function patch(platform) {
     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>)/;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org