From c499c871d586015abf0ff685459aa7ce32ffeb64 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Thu, 5 Jan 2023 03:52:42 +0000 Subject: [PATCH] Update file executable_install-program --- home/dot_local/bin/executable_install-program | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index 9adb7691..7c24543c 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1350,28 +1350,18 @@ async function pruneInstallOrders(installOrders) { } }) } else if (pkgManager === 'brew') { - newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => { - try { - log('info', 'Detecting Brew Package', `Checking for presence of ${pkg} with Homebrew`) - await $`brew list ${pkg} > /dev/null` - log('info', 'Brew Package', `${pkg} is present`) - return true - } catch (e) { - return false - } - }) - /*let newVal = newOrders[pkgManager] + let newVal = newOrders[pkgManager] for (const pkg of newOrders[pkgManager]) { try { - log('info', 'Test', 'Listing..') - await $`brew list ${pkg}` - log('info) + console.log('start') + runCommand('Pruning Homebrew packages that are already installed from the install list', `brew list ${pkg}`) + console.log('stop') newVal = newVal.filter(x => x === pkg) } catch (e) { // 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 (pkg) => {