Fix double-parsing of process config
Summary: This had been there for way too long. Reviewed By: mweststrate Differential Revision: D18834089 fbshipit-source-id: 563aa04876910a7544a7f62865b146b933dbf570
This commit is contained in:
committed by
Facebook Github Bot
parent
1a389202ca
commit
cde949e3a1
@@ -9,10 +9,9 @@
|
|||||||
|
|
||||||
import electron from 'electron';
|
import electron from 'electron';
|
||||||
import isProduction from './isProduction';
|
import isProduction from './isProduction';
|
||||||
|
import processConfig from './processConfig';
|
||||||
|
|
||||||
export const isAutoUpdaterEnabled = () =>
|
export const isAutoUpdaterEnabled = () =>
|
||||||
// TODO(T39788540): Centralise config access and avoid parsing multiple times.
|
processConfig().updaterEnabled &&
|
||||||
JSON.parse(electron.remote.process.env.CONFIG || process.env.CONFIG || '{}')
|
|
||||||
.updaterEnabled &&
|
|
||||||
isProduction() &&
|
isProduction() &&
|
||||||
process.platform === 'darwin';
|
process.platform === 'darwin';
|
||||||
|
|||||||
Reference in New Issue
Block a user