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

View File

@@ -74,7 +74,7 @@ async function applyConfig(config) {
safe.fs.unlinkSync(paths.LDAP_ALLOWLIST_FILE);
}
const [error] = await safe(shell.promises.sudo([ SET_LDAP_ALLOWLIST_CMD ], {}));
const [error] = await safe(shell.sudo([ SET_LDAP_ALLOWLIST_CMD ], {}));
if (error) throw new BoxError(BoxError.IPTABLES_ERROR, `Error setting ldap allowlist: ${error.message}`);
if (!config.enabled) {