From 089bd0dd8b7583333b25afdfed19a9ea68775386 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Wed, 4 Jan 2023 07:33:00 +0000 Subject: [PATCH] Update file executable_install-program --- home/dot_local/bin/executable_install-program | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index 7b8bc334..f7c0fd5a 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1316,7 +1316,7 @@ async function updateSystemd(service) { async function pruneInstallOrders(installOrders) { const newOrders = Object.assign({}, installOrders) - for (const pkgManager in installOrders) { + for (const pkgManager of installOrders) { if (pkgManager === 'apt') { newOrders[pkgManager] = newOrders[pkgManager].filter(async x => { try { @@ -1327,14 +1327,15 @@ async function pruneInstallOrders(installOrders) { } }) } else if (pkgManager === 'brew') { - newOrders[pkgManager] = newOrders[pkgManager].filter(async x => { + let newVal = newOrders[pkgManager] + for (const pkg in newOrders[pkgManager]) { try { await $`brew list ${pkg}` - return true } catch (e) { - return false + // Do nothing } - }) + } + newOrders[pkgManager] = newVal } else if (pkgManager === 'dnf') { const dnf = which.sync('dnf', { nothrow: true }) newOrders[pkgManager] = newOrders[pkgManager].filter(async x => {