Skip to content

Commit

Permalink
Merge pull request #1563 from glopesdev/issue-1541
Browse files Browse the repository at this point in the history
Ensure arguments with spaces are surrounded by quotation marks
  • Loading branch information
glopesdev authored Sep 20, 2023
2 parents 97b20bd + 171d741 commit c505a6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Bonsai/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c505a6e

Please sign in to comment.