From 27be89d39aee95297eae1689cadc5768157d83fc Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 21 Oct 2013 16:48:52 +0800 Subject: [PATCH] Should not touch process.argv when starting the default_app. --- browser/default_app/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/default_app/main.js b/browser/default_app/main.js index 3bfb5b5..2aff83e 100644 --- a/browser/default_app/main.js +++ b/browser/default_app/main.js @@ -1,6 +1,7 @@ var app = require('app'); var dialog = require('dialog'); var path = require('path'); +var optimist = require('optimist'); // Quit when all windows are closed and no other one is listening to this. app.on('window-all-closed', function() { @@ -8,8 +9,7 @@ app.on('window-all-closed', function() { app.quit(); }); -process.argv.splice(1, 0, 'dummyScript'); -var argv = require('optimist').argv; +var argv = optimist(process.argv.slice(1)).argv; // Start the specified app if there is one specified in command line, otherwise // start the default app. -- 2.7.4