This commit is contained in:
Hari Krishna Reddy Juturu 2017-06-19 08:03:02 -07:00
parent e546820a4a
commit 902b34ba39
2 changed files with 10 additions and 11 deletions

View file

@ -1,8 +1,8 @@
const { ipcRenderer } = require('electron')
if (process) {
process.once('loaded', function () {
ipcRenderer.send('processArgs', process.argv)
})
process.once('loaded', function () {
ipcRenderer.send('processArgs', process.argv)
})
} else {
ipcRenderer.send('processArgs', 'unable to get process args')
}
ipcRenderer.send('processArgs', 'unable to get process args')
}

View file

@ -4,12 +4,11 @@ const path = require('path')
const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-app-mixed-sandbox' : '/tmp/electron-app-mixed-sandbox'
process.on('uncaughtException', (error) => {
process.on('uncaughtException', () => {
app.exit(1)
})
app.once('ready', () => {
let lastArg = process.argv[process.argv.length - 1]
const client = net.connect(socketPath)
client.once('connect', () => {
@ -20,14 +19,14 @@ app.once('ready', () => {
let window = new BrowserWindow({
show: false,
webPreferences: {
preload: path.join(app.getAppPath(), 'electron-app-mixed-sandbox-preload.js'),
sandbox: false
preload: path.join(app.getAppPath(), 'electron-app-mixed-sandbox-preload.js'),
sandbox: false
}
})
window.loadURL('data:,window')
} else {
client.end(String(false))
client.end(String(false))
}
})
client.once('end', () => {