From 84a87dd1dee524fcc18c6e69e4224ab61a75e3bf Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Sat, 19 Mar 2016 19:40:49 -0700 Subject: [PATCH] log command line arguments --- main/index.js | 3 +++ renderer/index.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/main/index.js b/main/index.js index e1da3a45..042d47d2 100644 --- a/main/index.js +++ b/main/index.js @@ -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) }) diff --git a/renderer/index.js b/renderer/index.js index d1b32d0d..9989eb75 100644 --- a/renderer/index.js +++ b/renderer/index.js @@ -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) {