You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/03/18 15:35:50 UTC

cordova-browser git commit: CB-8196 Browser platform `run` should default source file to index.html even if it's missing in the config.xml

Repository: cordova-browser
Updated Branches:
  refs/heads/master 90b24d3f0 -> 414652043


CB-8196 Browser platform `run` should default source file to index.html even if it's missing in the config.xml


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

Branch: refs/heads/master
Commit: 4146520435689c3c8f3f9e54f1072b82f24c1711
Parents: 90b24d3
Author: daserge <da...@yandex.ru>
Authored: Mon Dec 22 10:40:30 2014 +0300
Committer: Vladimir Kotikov <v-...@microsoft.com>
Committed: Wed Mar 18 17:34:27 2015 +0300

----------------------------------------------------------------------
 bin/templates/project/cordova/run | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-browser/blob/41465204/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/run b/bin/templates/project/cordova/run
index 2a3b357..1c855c8 100755
--- a/bin/templates/project/cordova/run
+++ b/bin/templates/project/cordova/run
@@ -37,8 +37,8 @@ function start(argv) {
     var configFile = path.resolve(path.join(path.join(__dirname, '../'), 'config.xml')),
         configXML = fs.readFileSync(configFile, 'utf8'),
         sourceFile = /<content[\s\S]*?src\s*=\s*"(.*?)"/i.exec(configXML),
-        projectUrl = 'file://' + path.resolve(path.join(path.join(__dirname, '../'), 'www', sourceFile[1]));
-    
+        projectUrl = 'file://' + path.resolve(path.join(path.join(__dirname, '../'), 'www', sourceFile ? sourceFile[1] : 'index.html'));
+
     // Defaults to executing the chrome browser
     run.runBrowser(args.target || "chrome", projectUrl).done();
 }


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