Don't pollute process.argv of browser process.
This commit is contained in:
parent
ce586e0835
commit
9a58706e1f
2 changed files with 5 additions and 2 deletions
|
@ -66,7 +66,7 @@ void AtomMainDelegate::PreSandboxStartup() {
|
||||||
command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
|
command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
|
||||||
|
|
||||||
// Add a flag to mark the end of switches added by atom-shell.
|
// Add a flag to mark the end of switches added by atom-shell.
|
||||||
command_line->AppendSwitch("no-more-switches");
|
command_line->AppendSwitch("no-more-atom-shell-switches");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomMainDelegate::InitializeResourceBundle() {
|
void AtomMainDelegate::InitializeResourceBundle() {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
var app = require('app');
|
var app = require('app');
|
||||||
var dialog = require('dialog');
|
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var optimist = require('optimist');
|
var optimist = require('optimist');
|
||||||
|
|
||||||
|
@ -9,6 +8,10 @@ app.on('window-all-closed', function() {
|
||||||
app.quit();
|
app.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Pick out switches appended by atom-shell.
|
||||||
|
var endMark = process.argv.indexOf('--no-more-atom-shell-switches');
|
||||||
|
process.execArgv = process.argv.splice(1, endMark)
|
||||||
|
|
||||||
var argv = optimist(process.argv.slice(1)).argv;
|
var argv = optimist(process.argv.slice(1)).argv;
|
||||||
|
|
||||||
// Start the specified app if there is one specified in command line, otherwise
|
// Start the specified app if there is one specified in command line, otherwise
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue