]> khamidou — GitHub mirrors - electron.git/commitdiff
add --app parameter and update the example usage in the default_app #1877
authorJan Wiemers <j.wiemers@allerdesign.de>
Wed, 7 Oct 2015 21:14:49 +0000 (23:14 +0200)
committerJan Wiemers <j.wiemers@allerdesign.de>
Wed, 7 Oct 2015 21:22:00 +0000 (23:22 +0200)
atom/browser/default_app/index.html
atom/browser/default_app/main.js

index 96e45806d5dd39dba510a8250e5ab3d5ca768563..b9bdfffc659f8321234ff49534954f286c8d1441 100644 (file)
@@ -58,7 +58,7 @@
 <body>
   <script>
     var execPath = require('remote').process.execPath;
-    var command = execPath + ' path-to-your-app';
+    var command = execPath + '--app=path-to-your-app';
 
     document.onclick = function(e) {
       e.preventDefault();
index 1b92685d13a288e81ef1200ec2638a7446eaf289..e2c29f2d7e691af0f939adfc5aa4cacbf8fe4acc 100644 (file)
@@ -18,6 +18,9 @@ for (var i = 0; i < argv.length; i++) {
   if (argv[i] == '--version' || argv[i] == '-v') {
     option.version = true;
     break;
+  } else if (argv[i].match(/^--app=/)) {
+    option.file = argv[i].split('=')[1];
+    break;
   } else if (argv[i] == '--help' || argv[i] == '-h') {
     option.help = true;
     break;