diff --git a/src/Cake.ProtobufTools.Tests/Protoc/ProtocAliasesTest.cs b/src/Cake.ProtobufTools.Tests/Protoc/ProtocAliasesTest.cs index d160f3b..5110d39 100644 --- a/src/Cake.ProtobufTools.Tests/Protoc/ProtocAliasesTest.cs +++ b/src/Cake.ProtobufTools.Tests/Protoc/ProtocAliasesTest.cs @@ -16,7 +16,7 @@ public void WhenCSharpAndOFileAreSet_CommandLineIsCorrect() }; var actual = fixture.Run(); - Assert.That(actual.Args, Is.EqualTo("-oFILE --csharp_out=\"some_folder\" definitions.proto")); + Assert.That(actual.Args, Is.EqualTo("-oFILE --csharp_out=\"some_folder\" \"definitions.proto\"")); } } } diff --git a/src/Cake.ProtobufTools/ArgumentsBuilderExtension.cs b/src/Cake.ProtobufTools/ArgumentsBuilderExtension.cs index 9744019..7b68f43 100644 --- a/src/Cake.ProtobufTools/ArgumentsBuilderExtension.cs +++ b/src/Cake.ProtobufTools/ArgumentsBuilderExtension.cs @@ -40,7 +40,7 @@ public static void AppendAll(this ProcessArgumentBuilder builder, TSe { foreach (string argument in arguments) { - builder.Append(argument); + builder.AppendQuoted(argument); } } } diff --git a/src/Cake.ProtobufTools/ProtobufTools`1.cs b/src/Cake.ProtobufTools/ProtobufTools`1.cs index 530c4cd..8975e18 100644 --- a/src/Cake.ProtobufTools/ProtobufTools`1.cs +++ b/src/Cake.ProtobufTools/ProtobufTools`1.cs @@ -43,10 +43,10 @@ public void Run(ProtocSettings settings, string[] additional) Run(settings, GetArguments(settings, additional)); } - private ProcessArgumentBuilder GetArguments(ProtocSettings settings, string[] containers) + private ProcessArgumentBuilder GetArguments(ProtocSettings settings, string[] files) { var builder = new ProcessArgumentBuilder(); - builder.AppendAll(settings, containers); + builder.AppendAll(settings, files); return builder; }