sudo: add explicit captureStdout flag

This commit is contained in:
Girish Ramakrishnan
2024-07-08 09:58:25 +02:00
parent 7d8ba8d42c
commit 60c4dd3875
3 changed files with 9 additions and 7 deletions

View File

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