Print configuration errors

This commit is contained in:
Christoph Hagen 2022-02-24 12:31:00 +01:00
parent 782cc107e2
commit 06f013bc5c

View File

@ -18,6 +18,7 @@ public func configure(_ app: Application) throws {
.map { $0.trimmingCharacters(in: .whitespaces) }
.filter { !$0.isEmpty }
guard configData.count >= 2 else {
print("Invalid configuration file: \(configData.count) lines")
throw CapError.invalidConfiguration
}
let logFile = URL(fileURLWithPath: configData[0])