Skip to content

Commit 284f612

Browse files
committed
C#: Use StringBuilder for feed arguments in GetRestoreArgs
1 parent b6c74fe commit 284f612

File tree

1 file changed

+5
-2
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching

1 file changed

+5
-2
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DotNet.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
5-
5+
using System.Text;
66
using Newtonsoft.Json.Linq;
77

88
using Semmle.Util;
@@ -71,10 +71,13 @@ private string GetRestoreArgs(RestoreSettings restoreSettings)
7171
// the configuration file(s).
7272
if (restoreSettings.Sources != null)
7373
{
74+
var feedArgs = new StringBuilder();
7475
foreach (string source in restoreSettings.Sources)
7576
{
76-
args += $" -s {source}";
77+
feedArgs.Append($" -s {source}");
7778
}
79+
80+
args += feedArgs.ToString();
7881
}
7982

8083
if (restoreSettings.ForceReevaluation)

0 commit comments

Comments
 (0)