sudo: add explicit captureStdout flag
This commit is contained in:
@@ -34,7 +34,7 @@ function sshInfo() {
|
||||
}
|
||||
|
||||
async function getRemoteSupport() {
|
||||
const [error, stdoutResult] = await safe(shell.promises.sudo('support', [ AUTHORIZED_KEYS_CMD, 'is-enabled', sshInfo().filePath ], {}));
|
||||
const [error, stdoutResult] = await safe(shell.promises.sudo('support', [ AUTHORIZED_KEYS_CMD, 'is-enabled', sshInfo().filePath ], { captureStdout: true }));
|
||||
if (error) throw new BoxError(BoxError.FS_ERROR, error);
|
||||
|
||||
return stdoutResult.trim() === 'true';
|
||||
|
||||
Reference in New Issue
Block a user