mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-04-03 18:00:10 +02:00
🐛 Configuration files are reloaded gracefully
This commit is contained in:
@@ -133,8 +133,11 @@ class PhpConfigurationFile: CreatedFromFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func reload() {
|
public func reload() {
|
||||||
let newLines = try! String(contentsOfFile: self.filePath)
|
guard let newLines = try? String(contentsOfFile: self.filePath)
|
||||||
.components(separatedBy: "\n")
|
.components(separatedBy: "\n") else {
|
||||||
|
Log.warn("Could not reload PHP configuration file at: `\(self.filePath)`")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Update all properties atomically
|
// Update all properties atomically
|
||||||
lines = newLines
|
lines = newLines
|
||||||
|
|||||||
Reference in New Issue
Block a user