-
Notifications
You must be signed in to change notification settings - Fork 830
Closed
Labels
Area-FSIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
If a nuget source has name with a space in it then it's skipped. Looks like the regex assumes no spaces:
fsharp/src/FSharp.DependencyManager.Nuget/FSharp.DependencyManager.Utilities.fs
Lines 312 to 342 in 1492e70
| if success then | |
| // String returned by `dotnet nuget list source --format detailed` is formatted similar to: | |
| // Registered Sources: | |
| // 1. dotnet-eng [Enabled] | |
| // https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json | |
| // 2. dotnet-tools [Enabled] | |
| // https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | |
| // 3. dotnet5 [Enabled] | |
| // https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json | |
| // Use enabled feeds only (see NuGet.Commands.ListSourceRunner.Run) and strip off the flags. | |
| let pattern = | |
| @"(\s*\d+\.+\s*)(?'name'\S*)(\s*)\[(?'enabled'Enabled|Disabled)\](\s*)$(\s*)(?'uri'\S*)" | |
| let regex = | |
| new Regex(pattern, RegexOptions.Multiline ||| RegexOptions.ExplicitCapture) | |
| let sourcelist = String.concat Environment.NewLine stdOut | |
| String.concat | |
| Environment.NewLine | |
| [| | |
| for m in regex.Matches(sourcelist) do | |
| let name = m.Groups["name"].Value | |
| let enabled = m.Groups["enabled"].Value | |
| let uri = m.Groups["uri"].Value | |
| if enabled.Length > 0 && enabled[0] = 'E' then | |
| $""" <add key="{name}" value="{uri}" />""" | |
| |] | |
| else | |
| "" |
pimbrouwers
Metadata
Metadata
Assignees
Labels
Area-FSIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Type
Projects
Status
Done