Fix isProduction() detection

In the renderer process on OS X, config.IS_PRODUCTION was always true
because process.execPath is to "Electron Helper", so the detection
regex was being overly specific.
This commit is contained in:
Feross Aboukhadijeh
2016-05-13 13:29:25 -07:00
parent ac0574a473
commit 80faba8234

View File

@@ -69,7 +69,7 @@ function isProduction () {
return false
}
if (process.platform === 'darwin') {
return !/\/Electron\.app\/Contents\/MacOS\/Electron$/.test(process.execPath)
return !/\/Electron\.app\//.test(process.execPath)
}
if (process.platform === 'win32') {
return !/\\electron\.exe$/.test(process.execPath)