Only retain first parsing warning

This commit is contained in:
Davide De Rosa 2018-10-28 09:24:53 +01:00
parent 49b86c2888
commit ebe8c5836b
1 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ extension TunnelKitProvider.Configuration {
compressionFraming = .compLZO
guard let arg = $0.first, arg == "no" else {
warning = .unsupportedConfiguration(option: "compression")
warning = warning ?? .unsupportedConfiguration(option: "compression")
return
}
}
@ -238,7 +238,7 @@ extension TunnelKitProvider.Configuration {
compressionFraming = .compress
guard $0.isEmpty else {
warning = .unsupportedConfiguration(option: "compression")
warning = warning ?? .unsupportedConfiguration(option: "compression")
return
}
}