diff --git a/Bonsai/Program.cs b/Bonsai/Program.cs index f91376e9..338ea447 100644 --- a/Bonsai/Program.cs +++ b/Bonsai/Program.cs @@ -209,7 +209,8 @@ internal static int Main(string[] args) } using var pipeServer = new NamedPipeServerStream(pipeName, PipeDirection.In); - editorArgs.Add(PipeCommand + ":" + pipeName); + editorArgs = editorArgs.ConvertAll(arg => arg.Contains(' ') ? $"\"{arg}\"" : arg); + editorArgs.AddRange(new[] { PipeCommand, pipeName }); var setupInfo = new ProcessStartInfo(); setupInfo.FileName = Assembly.GetEntryAssembly().Location;