1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2026-04-04 18:30:09 +02:00

Show external extensions

This commit is contained in:
2023-11-22 21:29:51 +01:00
parent 67a00f979a
commit 9ca16e72d5
2 changed files with 43 additions and 12 deletions

View File

@@ -25,6 +25,14 @@ struct BrewPhpExtension: Hashable, Comparable {
)
}
var hasAlternativeInstall: Bool {
// Extension must be active
let isActive = PhpEnvironments.shared.currentInstall?.extensions
.contains(where: { $0.name == self.name }) ?? false
return isActive && !isInstalled
}
static func hasInstallationReceipt(for formulaName: String) -> Bool {
return FileSystem.fileExists("\(Paths.optPath)/\(formulaName)/INSTALL_RECEIPT.json")
}