Summary: In our organization, Flipper is distributed in a version controlled way. As a result, we do not want users to manually update or receive prompts to update when a new version is available. There is already a `--updater` flag in the command line arguments for flipper.exe, but it isn't piped through. This change pipes it through and disables all update related UI when `--no-updater` is passed in. ## Changelog Support --updater and --no-updater options for flipper.exe Pull Request resolved: https://github.com/facebook/flipper/pull/4277 Test Plan: Ran `yarn build --win` in flipper/desktop, and launched flipper.exe from flipper/dist/win-unpacked with the `--updater`, `--no-updater` and no flags and ensured the proper behavior was observed (update UI shows by default or when `--updater` is specified, and doesn't show when `--no-updater` is specified). Reviewed By: passy Differential Revision: D41298321 Pulled By: mweststrate fbshipit-source-id: 5ddfede2700954f0fdd6a111b20d0836fab25565
29 lines
941 B
TypeScript
29 lines
941 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import {ProcessConfig} from 'flipper-common';
|
|
|
|
export function loadProcessConfig(env: NodeJS.ProcessEnv): ProcessConfig {
|
|
const json = JSON.parse(env.CONFIG || '{}');
|
|
return {
|
|
disabledPlugins: json.disabledPlugins || [],
|
|
lastWindowPosition: json.lastWindowPosition,
|
|
launcherMsg: json.launcherMsg,
|
|
screenCapturePath: json.screenCapturePath,
|
|
launcherEnabled:
|
|
typeof json.launcherEnabled === 'boolean' ? json.launcherEnabled : true,
|
|
updaterEnabled:
|
|
typeof json.updaterEnabled === 'boolean' ? json.updaterEnabled : true,
|
|
suppressPluginUpdateNotifications:
|
|
typeof json.suppressPluginUpdateNotifications === 'boolean'
|
|
? json.suppressPluginUpdateNotifications
|
|
: false,
|
|
};
|
|
}
|