log command line arguments

This commit is contained in:
Feross Aboukhadijeh
2016-03-19 19:40:49 -07:00
parent 81bb8eea7b
commit 84a87dd1de
2 changed files with 5 additions and 0 deletions

View File

@@ -24,6 +24,9 @@ app.on('ready', function () {
})
app.on('ipcReady', function () {
if (argv.length) {
windows.main.send('log', 'command line args:', argv)
}
argv.forEach(function (torrentId) {
windows.main.send('dispatch', 'onOpen', torrentId)
})

View File

@@ -257,6 +257,8 @@ function jumpToTime (time) {
function setupIpc () {
ipcRenderer.send('ipcReady')
ipcRenderer.on('log', (e, ...args) => console.log(...args))
ipcRenderer.on('dispatch', (e, ...args) => dispatch(...args))
ipcRenderer.on('showOpenTorrentAddress', function (e) {