shell: make shell.sudo promise based and waitable

This commit is contained in:
Girish Ramakrishnan
2025-07-16 21:53:22 +02:00
parent 32d07e7959
commit 989d843fcb
15 changed files with 86 additions and 64 deletions
+1 -1
View File
@@ -986,7 +986,7 @@ async function delMailbox(name, domain, options, auditSource) {
const mailbox =`${name}@${domain}`;
if (options.deleteMails) {
const [error] = await safe(shell.promises.sudo([ REMOVE_MAILBOX_CMD, mailbox ], {}));
const [error] = await safe(shell.sudo([ REMOVE_MAILBOX_CMD, mailbox ], {}));
if (error) throw new BoxError(BoxError.FS_ERROR, `Error removing mailbox: ${error.message}`);
}