diff --git a/src/utils/__tests__/processConfig.node.js b/src/utils/__tests__/processConfig.node.js index ad7c958df..41a18fed1 100644 --- a/src/utils/__tests__/processConfig.node.js +++ b/src/utils/__tests__/processConfig.node.js @@ -18,6 +18,7 @@ test('config is decoded from env', () => { lastWindowPosition: {x: 4, y: 8, width: 15, height: 16}, updaterEnabled: false, screenCapturePath: '/my/screenshot/path', + launcherEnabled: false, }); expect(config()).toEqual({ @@ -26,6 +27,7 @@ test('config is decoded from env', () => { lastWindowPosition: {x: 4, y: 8, width: 15, height: 16}, updaterEnabled: false, screenCapturePath: '/my/screenshot/path', + launcherEnabled: false, }); }); @@ -38,5 +40,6 @@ test('config is decoded from env with defaults', () => { lastWindowPosition: undefined, updaterEnabled: true, screenCapturePath: undefined, + launcherEnabled: true, }); }); diff --git a/src/utils/processConfig.js b/src/utils/processConfig.js index ccf10e268..d2ca3435c 100644 --- a/src/utils/processConfig.js +++ b/src/utils/processConfig.js @@ -13,6 +13,8 @@ export type ProcessConfig = {| lastWindowPosition: ?{x: number, y: number, width: number, height: number}, screenCapturePath: ?string, updaterEnabled: boolean, + // Controls whether to delegate to the launcher if present. + launcherEnabled: boolean, |}; let configObj = null; @@ -29,6 +31,8 @@ export default function config(): ProcessConfig { updaterEnabled: typeof json.updaterEnabled === 'boolean' ? json.updaterEnabled : true, screenCapturePath: json.screenCapturePath, + launcherEnabled: + typeof json.launcherEnabled === 'boolean' ? json.launcherEnabled : true, }; } diff --git a/static/index.js b/static/index.js index b867dba45..bfd5df5fb 100644 --- a/static/index.js +++ b/static/index.js @@ -43,6 +43,11 @@ const argv = yargs describe: 'Toggle the built-in update mechanism.', type: 'boolean', }) + .option('launcher', { + default: true, + describe: 'Toggle delegating to the update launcher on startup.', + type: 'boolean', + }) .version(global.__VERSION__) .help().argv;