shell: make shell.sudo promise based and waitable
This commit is contained in:
+1
-1
@@ -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}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user