Fix how arguments are passed to scripts

net8.0
Pat Hartl 2023-11-17 21:39:28 -06:00
parent a47b77cc5c
commit 737f2bec84
1 changed files with 3 additions and 3 deletions

View File

@ -145,10 +145,10 @@ namespace LANCommander.SDK.PowerShell
if (IgnoreWow64) if (IgnoreWow64)
Wow64DisableWow64FsRedirection(ref wow64Value); Wow64DisableWow64FsRedirection(ref wow64Value);
Process.StartInfo.Arguments = String.Join(" ", Arguments.Select((name, value) => foreach (var argument in Arguments)
{ {
return $"-{name} {value}"; Process.StartInfo.Arguments += $" -{argument.Key} {argument.Value}";
})); }
if (!String.IsNullOrEmpty(WorkingDirectory)) if (!String.IsNullOrEmpty(WorkingDirectory))
Process.StartInfo.WorkingDirectory = WorkingDirectory; Process.StartInfo.WorkingDirectory = WorkingDirectory;