From 255fe69345f8c11c507966293039223628ca4169 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Mon, 9 Jan 2023 05:30:07 +0000 Subject: [PATCH] Update file executable_install-program --- home/dot_local/bin/executable_install-program | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index f8060265..1fd77e14 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1097,7 +1097,7 @@ async function installPackageList(packageManager, packages) { log('success', 'Install', `${pkg} successfully installed via ${packageManager}`) } catch (e) { log('error', 'Install Failure', `There was an error installing ${pkg} with apk`) - console.log(e) + console.error(e) } } } else if (packageManager === 'apt') { @@ -1206,7 +1206,6 @@ async function installPackageList(packageManager, packages) { try { runCommand(`Installing ${pkg} via ${packageManager}`, `gem install ${pkg}`) log('success', 'Install', `${pkg} successfully installed via ${packageManager}`) - await $`gem install ${pkg}` } catch (e) { log('error', 'Install Failure', `There was an error installing ${pkg} with gem`) console.error(e) @@ -1365,8 +1364,8 @@ async function updateService(service) { const systemctl = which.sync('systemctl', { nothrow: true }) if (systemctl) { try { - log('info', logStage, `Starting / enabling the ${service} service`) - await $`sudo systemctl enable --now ${service}` + runCommand(`Starting / enabling ${service} with systemctl`, `sudo systemctl enable --now ${service}`) + log('success', logStage, `Started / enabled the ${service} service`) } catch (e) { log('error', logStage, `There was an error starting / enabling the ${service} service`) console.error(e) @@ -1382,8 +1381,8 @@ async function updateService(service) { const brew = which.sync('brew', { nothrow: true }) if (brew) { try { - log('info', logStage, `Starting / enabling the ${service} service with Homebrew`) - await $`brew services start ${service}` + runCommand(`Starting / enabling ${service} with Homebrew`, `brew services start ${service}`) + log('success', logStage, `Started / enabled the ${service} service with Homebrew`) } catch (e) { log('error', logStage, `There was an error starting / enabling the ${service} Homebrew service`) console.error(e) @@ -1445,11 +1444,10 @@ async function pruneInstallOrders(installOrders) { }) } else if (pkgManager === 'flatpak') { const flatpakInstallation = await $`flatpak --installations` - console.log('RIGHT HERE') - console.log(flatpakInstallation) + const flatpakDir = flatpakInstallation.stdout.replace('\\n', '') newOrders[pkgManager] = await asyncFilter(newOrders[pkgManager], async (pkg) => { try { - await runSilentCommand(`test -d ${flatpakInstallation}/app/${pkg}`) + await runSilentCommand(`test -d ${flatpakDir}/app/${pkg}`) return false } catch (e) { return true