refactor: apply input control value from end to start

For example, this will avoid applying the first parameter to $10 - $19

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-26 09:26:33 +08:00
parent e5b845e1c5
commit 271f02b694
No known key found for this signature in database

View file

@ -127,7 +127,7 @@ namespace SourceGit.ViewModels
ProgressDescription = "Run custom action ...";
var cmdline = _commandline;
for (var i = 0; i < ControlParameters.Count; i++)
for (var i = ControlParameters.Count - 1; i >= 0; i--)
{
var param = ControlParameters[i];
cmdline = cmdline.Replace($"${i}", param.GetValue());