diff --git a/src/logs.js b/src/logs.js index 05d62701f..d126b34bb 100644 --- a/src/logs.js +++ b/src/logs.js @@ -71,11 +71,12 @@ function journalctl(unit, options) { assert.strictEqual(typeof unit, 'string'); assert.strictEqual(typeof options, 'object'); - const args = []; - args.push('--lines=' + (options.lines === -1 ? 'all' : options.lines)); - args.push(`--unit=${unit}`); - args.push('--no-pager'); - args.push('--output=short-iso'); + const args = [ + '--lines=' + (options.lines === -1 ? 'all' : options.lines), + `--unit=${unit}`, + '--no-pager', + '--output=short-iso' + ]; if (options.follow) args.push('--follow'); diff --git a/src/shell.js b/src/shell.js index db27f0621..5609bd880 100644 --- a/src/shell.js +++ b/src/shell.js @@ -20,7 +20,7 @@ exports = module.exports = { const SUDO = '/usr/bin/sudo'; -// default encoding utf8, no shell, separate args +// default encoding utf8, no shell, separate args, wait for process to finish async function execArgs(tag, file, args, options) { assert.strictEqual(typeof tag, 'string'); assert.strictEqual(typeof file, 'string'); @@ -50,7 +50,7 @@ async function execArgs(tag, file, args, options) { }); } -// default encoding utf8, no shell, handles input, full command +// default encoding utf8, no shell, handles input, full command, wait for process to finish async function exec(tag, cmd, options) { assert.strictEqual(typeof tag, 'string'); assert.strictEqual(typeof cmd, 'string');