From c696ecfe1c0cbbf6c0e30d2165e5e3569ca0414f Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Thu, 5 Jan 2023 03:10:13 +0000 Subject: [PATCH] Update file executable_install-program --- home/dot_local/bin/executable_install-program | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index 8faa8981..686311fb 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1337,7 +1337,15 @@ async function pruneInstallOrders(installOrders) { } }) } else if (pkgManager === 'brew') { - let newVal = newOrders[pkgManager] + newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (x) => { + try { + await $`brew list ${pkg} > /dev/null` + return true + } catch (e) { + return false + } + }) + /*let newVal = newOrders[pkgManager] for (const pkg of newOrders[pkgManager]) { try { await $`brew list ${pkg}` @@ -1346,7 +1354,7 @@ async function pruneInstallOrders(installOrders) { // Do nothing } } - newOrders[pkgManager] = newVal + newOrders[pkgManager] = newVal*/ } else if (pkgManager === 'dnf') { const dnf = which.sync('dnf', { nothrow: true }) newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (x) => {