1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-06 19:40:08 +02:00

🐛 Own the entire Homebrew formula directory

This commit is contained in:
2023-05-24 19:19:04 +02:00
parent cbebf75b48
commit 8240b676c1

View File

@ -61,28 +61,14 @@ class BrewPermissionFixer {
? "php"
: "php@\(formula)"
let binaryPath = "\(Paths.optPath)/\(realFormula)/bin"
if isOwnedByRoot(path: binaryPath) {
if isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/bin")
|| isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/sbin") {
let borked = DueOwnershipFormula(
formula: realFormula,
path: binaryPath
path: "\(Paths.optPath)/\(realFormula)"
)
Log.warn("\(formula) is owned by root (bin folder)")
broken.append(borked)
}
let serverBinaryPath = "\(Paths.optPath)/\(realFormula)/sbin"
if isOwnedByRoot(path: serverBinaryPath) {
let borked = DueOwnershipFormula(
formula: realFormula,
path: serverBinaryPath
)
Log.warn("\(formula) is owned by root (sbin folder)")
Log.warn("\(formula) is owned by root")
broken.append(borked)
}