Set up --no-launcher flag
Summary: For future use to disable launcher loops. Reviewed By: jknoxville Differential Revision: D13979653 fbshipit-source-id: db56f7d71d7a4d1322cb36622313dbad4307396d
This commit is contained in:
committed by
Facebook Github Bot
parent
39cb25ade9
commit
2b9e3c54c6
@@ -18,6 +18,7 @@ test('config is decoded from env', () => {
|
|||||||
lastWindowPosition: {x: 4, y: 8, width: 15, height: 16},
|
lastWindowPosition: {x: 4, y: 8, width: 15, height: 16},
|
||||||
updaterEnabled: false,
|
updaterEnabled: false,
|
||||||
screenCapturePath: '/my/screenshot/path',
|
screenCapturePath: '/my/screenshot/path',
|
||||||
|
launcherEnabled: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(config()).toEqual({
|
expect(config()).toEqual({
|
||||||
@@ -26,6 +27,7 @@ test('config is decoded from env', () => {
|
|||||||
lastWindowPosition: {x: 4, y: 8, width: 15, height: 16},
|
lastWindowPosition: {x: 4, y: 8, width: 15, height: 16},
|
||||||
updaterEnabled: false,
|
updaterEnabled: false,
|
||||||
screenCapturePath: '/my/screenshot/path',
|
screenCapturePath: '/my/screenshot/path',
|
||||||
|
launcherEnabled: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -38,5 +40,6 @@ test('config is decoded from env with defaults', () => {
|
|||||||
lastWindowPosition: undefined,
|
lastWindowPosition: undefined,
|
||||||
updaterEnabled: true,
|
updaterEnabled: true,
|
||||||
screenCapturePath: undefined,
|
screenCapturePath: undefined,
|
||||||
|
launcherEnabled: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ export type ProcessConfig = {|
|
|||||||
lastWindowPosition: ?{x: number, y: number, width: number, height: number},
|
lastWindowPosition: ?{x: number, y: number, width: number, height: number},
|
||||||
screenCapturePath: ?string,
|
screenCapturePath: ?string,
|
||||||
updaterEnabled: boolean,
|
updaterEnabled: boolean,
|
||||||
|
// Controls whether to delegate to the launcher if present.
|
||||||
|
launcherEnabled: boolean,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
let configObj = null;
|
let configObj = null;
|
||||||
@@ -29,6 +31,8 @@ export default function config(): ProcessConfig {
|
|||||||
updaterEnabled:
|
updaterEnabled:
|
||||||
typeof json.updaterEnabled === 'boolean' ? json.updaterEnabled : true,
|
typeof json.updaterEnabled === 'boolean' ? json.updaterEnabled : true,
|
||||||
screenCapturePath: json.screenCapturePath,
|
screenCapturePath: json.screenCapturePath,
|
||||||
|
launcherEnabled:
|
||||||
|
typeof json.launcherEnabled === 'boolean' ? json.launcherEnabled : true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ const argv = yargs
|
|||||||
describe: 'Toggle the built-in update mechanism.',
|
describe: 'Toggle the built-in update mechanism.',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
})
|
})
|
||||||
|
.option('launcher', {
|
||||||
|
default: true,
|
||||||
|
describe: 'Toggle delegating to the update launcher on startup.',
|
||||||
|
type: 'boolean',
|
||||||
|
})
|
||||||
.version(global.__VERSION__)
|
.version(global.__VERSION__)
|
||||||
.help().argv;
|
.help().argv;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user