Set crashReporter productName in specs

This commit is contained in:
Kevin Sawicki 2016-09-08 11:32:09 -07:00 committed by Kevin Sawicki
parent 63e9bc4804
commit d407eab0ff

View file

@ -3,6 +3,7 @@ process.throwDeprecation = true
const electron = require('electron') const electron = require('electron')
const app = electron.app const app = electron.app
const crashReporter = electron.crashReporter
const ipcMain = electron.ipcMain const ipcMain = electron.ipcMain
const dialog = electron.dialog const dialog = electron.dialog
const BrowserWindow = electron.BrowserWindow const BrowserWindow = electron.BrowserWindow
@ -39,6 +40,11 @@ ipcMain.on('message', function (event, ...args) {
event.sender.send('message', ...args) event.sender.send('message', ...args)
}) })
// Set productName so getUploadedReports() uses the right directory in specs
if (process.platform === 'win32') {
crashReporter.productName = 'Zombies'
}
// Write output to file if OUTPUT_TO_FILE is defined. // Write output to file if OUTPUT_TO_FILE is defined.
const outputToFile = process.env.OUTPUT_TO_FILE const outputToFile = process.env.OUTPUT_TO_FILE
const print = function (_, args) { const print = function (_, args) {