shell: no need to promise scoping

This commit is contained in:
Girish Ramakrishnan
2024-02-21 19:40:27 +01:00
parent cfd5c0f82b
commit a6f078330f
20 changed files with 105 additions and 107 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ async function hdparm(file) {
}
async function getSwaps() {
const [error, stdout] = await safe(shell.promises.exec('getSwaps', 'swapon --noheadings --raw --bytes --show=type,size,used,name', {}));
const [error, stdout] = await safe(shell.exec('getSwaps', 'swapon --noheadings --raw --bytes --show=type,size,used,name', {}));
if (error) return {};
const swaps = {};
@@ -329,7 +329,7 @@ async function getLogs(unit, options) {
}
async function getBlockDevices() {
const result = await shell.promises.exec('getBlockDevices', 'lsblk --paths --json --list --fs', {});
const result = await shell.exec('getBlockDevices', 'lsblk --paths --json --list --fs', {});
const info = safe.JSON.parse(result);
if (!info) throw new BoxError(BoxError.INTERNAL_ERROR, `failed to parse lsblk: ${safe.error.message}`);