fix: disable usage stats param not passed when in daemon mode. Closes #188

pull/213/head
Maciej Winnicki 2020-04-13 21:24:54 +02:00
parent 94e2c46ee6
commit 5dad99106e
No known key found for this signature in database
GPG Key ID: D0B924AEC4BE0E44
2 changed files with 20 additions and 0 deletions

View File

@ -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, {

View File

@ -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']);