From c65210043ecdd17dc2a4d3a359ce25c5b02fef3c Mon Sep 17 00:00:00 2001 From: ansgarz Date: Fri, 20 May 2022 21:45:28 +0200 Subject: [PATCH] fix isPackageInstalled --- .../provs/framework/ubuntu/install/base/Install.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/install/base/Install.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/install/base/Install.kt index b1fb8cb..69dfa78 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/install/base/Install.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/install/base/Install.kt @@ -63,14 +63,10 @@ fun Prov.aptInstallFromPpa(launchPadUser: String, ppaName: String, packageName: /** - * Checks if a program is installed - * - * @param packageName to check - * @return true if program is installed + * Returns true if a package is installed else false */ -@Suppress("unused") // used externally fun Prov.isPackageInstalled(packageName: String): Boolean { - return chk("timeout 2 dpkg -l $packageName") + return chk("dpkg -s $packageName") }