Migrate argvUtils
Summary: _typescript_ Quite happy that the stupid check for `remote` can finally go away. Reviewed By: jknoxville Differential Revision: D16709217 fbshipit-source-id: 94bc035d2a7bbc3131e35febd48723760841f6b4
This commit is contained in:
committed by
Facebook Github Bot
parent
c191514d68
commit
b292ecec71
@@ -32,7 +32,7 @@ import ScreenCaptureButtons from './ScreenCaptureButtons.js';
|
||||
import AutoUpdateVersion from './AutoUpdateVersion';
|
||||
import UpdateIndicator from './UpdateIndicator';
|
||||
import config from '../fb-stubs/config';
|
||||
import {isAutoUpdaterEnabled} from '../utils/argvUtils.js';
|
||||
import {isAutoUpdaterEnabled} from '../utils/argvUtils';
|
||||
import isProduction from '../utils/isProduction.js';
|
||||
import {clipboard} from 'electron';
|
||||
import React from 'react';
|
||||
|
||||
@@ -10,8 +10,7 @@ import isProduction from './isProduction';
|
||||
|
||||
export const isAutoUpdaterEnabled = () =>
|
||||
// TODO(T39788540): Centralise config access and avoid parsing multiple times.
|
||||
// $FlowFixMe: env is not in the type defs.
|
||||
JSON.parse(electron.remote?.process.env.CONFIG || process.env.CONFIG || '{}')
|
||||
JSON.parse(electron.remote.process.env.CONFIG || process.env.CONFIG || '{}')
|
||||
.updaterEnabled &&
|
||||
isProduction() &&
|
||||
process.platform === 'darwin';
|
||||
Reference in New Issue
Block a user