// IsPackageInstalled uses dpkg-query to determine if the `packageName` // package is installed. func IsPackageInstalled(packageName string) bool { _, err := utils.RunCommand("dpkg-query", "--status", packageName) return err == nil }
// run the command and return the combined output. func run(command string, args ...string) (output string, err error) { logger.Tracef("%s %v", command, args) output, err = utils.RunCommand(command, args...) logger.Tracef("output: %v", output) return output, err }