Add --no-updater flag
Summary: Provide a `--no-updater` option that disables the in-app auto updater when passed. Reviewed By: jknoxville Differential Revision: D13713919 fbshipit-source-id: 49a647105fea1efa23f653e4a6ed452b3489879b
This commit is contained in:
committed by
Facebook Github Bot
parent
87f64c4535
commit
82f4d4ad95
15
src/utils/argvUtils.js
Normal file
15
src/utils/argvUtils.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
import electron from 'electron';
|
||||
import isProduction from './isProduction';
|
||||
|
||||
export const isAutoUpdaterEnabled = () =>
|
||||
// $FlowFixMe: argv is not included in the type defs.
|
||||
!electron.remote.process.argv.includes('--no-updater') &&
|
||||
isProduction() &&
|
||||
process.platform === 'darwin';
|
||||
Reference in New Issue
Block a user