Skip to content

Commit b14bd65

Browse files
Copilotakoeplinger
andcommitted
Fix whitespace trimming in ExpandLocalFeed to prevent path processing issues
Co-authored-by: akoeplinger <[email protected]>
1 parent 68eb541 commit b14bd65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private IEnumerable<PackageSource> LoadOverrideSources(PackageSourceLocation pac
355355
continue;
356356
}
357357

358-
PackageSource packageSource = new(source.Trim());
358+
PackageSource packageSource = new(source);
359359
if (packageSource.TrySourceAsUri == null)
360360
{
361361
_verboseLogger.LogWarning(string.Format(
@@ -418,7 +418,7 @@ private List<PackageSource> LoadDefaultSources(PackageId packageId, PackageSourc
418418
continue;
419419
}
420420

421-
PackageSource packageSource = new(source.Trim());
421+
PackageSource packageSource = new(source);
422422
if (packageSource.TrySourceAsUri == null)
423423
{
424424
_verboseLogger.LogWarning(string.Format(

src/Cli/dotnet/NugetPackageDownloader/PackageSourceLocation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private static string[] ExpandLocalFeed(string[] sourceFeedOverrides, string bas
3838
string[] localFeedsThatIsRooted = new string[sourceFeedOverrides.Length];
3939
for (int index = 0; index < sourceFeedOverrides.Length; index++)
4040
{
41-
string feed = sourceFeedOverrides[index];
41+
string feed = sourceFeedOverrides[index].Trim();
4242
if (!Uri.IsWellFormedUriString(feed, UriKind.Absolute) && !Path.IsPathRooted(feed))
4343
{
4444
localFeedsThatIsRooted[index] = Path.GetFullPath(feed, basePath);

0 commit comments

Comments
 (0)