mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-03-29 08:00:08 +02:00
🐛 Own the entire Homebrew formula directory
This commit is contained in:
@@ -61,28 +61,14 @@ class BrewPermissionFixer {
|
|||||||
? "php"
|
? "php"
|
||||||
: "php@\(formula)"
|
: "php@\(formula)"
|
||||||
|
|
||||||
let binaryPath = "\(Paths.optPath)/\(realFormula)/bin"
|
if isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/bin")
|
||||||
|
|| isOwnedByRoot(path: "\(Paths.optPath)/\(realFormula)/sbin") {
|
||||||
if isOwnedByRoot(path: binaryPath) {
|
|
||||||
let borked = DueOwnershipFormula(
|
let borked = DueOwnershipFormula(
|
||||||
formula: realFormula,
|
formula: realFormula,
|
||||||
path: binaryPath
|
path: "\(Paths.optPath)/\(realFormula)"
|
||||||
)
|
)
|
||||||
|
|
||||||
Log.warn("\(formula) is owned by root (bin folder)")
|
Log.warn("\(formula) is owned by root")
|
||||||
|
|
||||||
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)")
|
|
||||||
|
|
||||||
broken.append(borked)
|
broken.append(borked)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user