1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-11-07 05:10:06 +01:00

Fix tests

This commit is contained in:
2023-02-26 14:45:15 +01:00
parent cb504cc3f0
commit 715b674929
5 changed files with 11 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ class AppVersion: Comparable {
init(version: String, build: String?, suffix: String? = nil) {
self.version = version
self.build = Int(build ?? "0")
self.build = build == nil ? nil : Int(build!)
self.suffix = suffix
}

View File

@@ -40,6 +40,9 @@ struct CaskFile {
let lines = string.split(separator: "\n")
.filter { $0 != "" }
.map { line in
return line.trimmingCharacters(in: .whitespacesAndNewlines)
}
if lines.count < 4 {
Log.err("The CaskFile is <4 lines long, which is too short")