test: only suppress starttask.sh output and not sudo

the remote support logic uses sudo output in tests
This commit is contained in:
Girish Ramakrishnan
2023-07-13 09:08:06 +05:30
parent 13a8926f60
commit 7926ff2811
2 changed files with 5 additions and 4 deletions
-3
View File
@@ -3,9 +3,7 @@
const assert = require('assert'),
BoxError = require('./boxerror.js'),
child_process = require('child_process'),
constants = require('./constants.js'),
debug = require('debug')('box:shell'),
fs = require('fs'),
once = require('./once.js'),
util = require('util');
@@ -101,7 +99,6 @@ function sudo(tag, args, options, callback) {
let sudoArgs = [ '-S' ]; // -S makes sudo read stdin for password
if (options.preserveEnv) sudoArgs.push('-E'); // -E preserves environment
if (options.ipc) sudoArgs.push('--close-from=4'); // keep the ipc open. requires closefrom_override in sudoers file
if (constants.TEST) options.logStream = fs.createWriteStream('/dev/null'); // without this output is messed up, not sure why
const cp = spawn(tag, SUDO, sudoArgs.concat(args), options, callback);
cp.stdin.end();