Skip to content

Commit 63841e4

Browse files
authored
Fix generating with no options in buf.gen.yaml (#79)
Fixes the following error which is thrown when no `opt` is specified in `buf.gen.yaml`: > unknownParameter(string: "")
1 parent 0a1de68 commit 63841e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Plugins/ConnectPluginUtilities/GeneratorOptions.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ private enum CommandLineParameter: String {
4646
return try commandLineParameters
4747
.components(separatedBy: ",")
4848
.compactMap { parameter in
49+
if parameter.isEmpty {
50+
return nil
51+
}
52+
4953
guard let index = parameter.firstIndex(of: "=") else {
5054
throw Error.unknownParameter(string: parameter)
5155
}

0 commit comments

Comments
 (0)