shell: merge some options

This commit is contained in:
Girish Ramakrishnan
2025-07-16 21:32:27 +02:00
parent e03beba9bc
commit 50b585c1dd
2 changed files with 4 additions and 3 deletions

View File

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