mirror of https://github.com/mthenw/frontail.git
fix: disable usage stats param not passed when in daemon mode. Closes #188
parent
94e2c46ee6
commit
5dad99106e
|
@ -54,6 +54,10 @@ module.exports = (script, params, opts) => {
|
|||
args.push('--ui-highlight-preset', params.uiHighlightPreset);
|
||||
}
|
||||
|
||||
if (params.disableUsageStats) {
|
||||
args.push('--disable-usage-stats', params.disableUsageStats);
|
||||
}
|
||||
|
||||
args = args.concat(params.args);
|
||||
|
||||
const proc = daemon.daemon(script, args, {
|
||||
|
|
|
@ -207,6 +207,22 @@ describe('daemonize', () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it('with disable usage stats', () => {
|
||||
optionsParser.parse([
|
||||
'node',
|
||||
'/path/to/frontail',
|
||||
'--disable-usage-stats',
|
||||
'test.json',
|
||||
]);
|
||||
|
||||
daemonize('script', optionsParser);
|
||||
|
||||
daemon.daemon.lastCall.args[1].should.containDeep([
|
||||
'--disable-usage-stats',
|
||||
'test.json',
|
||||
]);
|
||||
});
|
||||
|
||||
it('with file to tail', () => {
|
||||
optionsParser.parse(['node', '/path/to/frontail', '/path/to/file']);
|
||||
|
||||
|
|
Loading…
Reference in New Issue