Skip to content

Commit

Permalink
Fix passing multiple arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Jul 4, 2024
1 parent 86d2f9f commit f123c55
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Resources/Program.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
using System.Diagnostics;
using System.Runtime.InteropServices;

string arguments = string.Join("\" \"", args);
for(int i = 0; i < args.Length; i++)
{
if(args[i].Contains(" "))
{
args[i] = $"\"{args[i]}\"";
}
}

string arguments = string.Join(" ", args);
string baseDirectory = AppContext.BaseDirectory;

ProcessStartInfo startInfo = new ProcessStartInfo()
Expand Down

0 comments on commit f123c55

Please sign in to comment.