shell: merge some options
This commit is contained in:
@@ -113,9 +113,9 @@ function sudo(tag, args, options, callback) {
|
||||
|
||||
callback = once(callback); // exit may or may not be called after an 'error'
|
||||
|
||||
const logFunc = options.outputHasTimestamps ? process.stdout.write : debug;
|
||||
const logFunc = options.logger || debug;
|
||||
|
||||
if (options.ipc) {
|
||||
if (options.onMessage) { // enable ipc
|
||||
sudoArgs.push('--close-from=4'); // keep the ipc open. requires closefrom_override in sudoers file
|
||||
options.stdio = ['pipe', 'pipe', 'pipe', 'ipc'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user