title: Get command line arguments from Electron Application that is already running?
body: <p>Currently I need to get command line arguments from an Electron application. So if you start the application with command line arguments, I need to use the arguments within the renderer process (a webview to be specific.)</p>
  
  <p>This works fine when opening the application for the first time (using onload), but I'm having issues getting this to work when the application is already running and the user tries to reopen the app from cmd with args.</p>
  
  <p>Currently, I'm using:</p>
  
  <pre><code>let closeDupeApp = app.makeSingleInstance(function(commandLine, workingDirectory) {
      // Someone tried to run a second instance, we should focus our window.
      if (mainWindow) {
          if (mainWindow.isMinimized()) mainWindow.restore();
          mainWindow.focus();
      }
  });
  </code></pre>
  
  <p>To prevent a second window from opening. However, I need the commandLine arguments and I need to send them to the renderer process.</p>
  
  <p>Is there a way to do this?</p>