Skip to content

Commit

Permalink
account for prerelease label having - wherever and having digits
Browse files Browse the repository at this point in the history
  • Loading branch information
anamnavi committed Oct 25, 2024
1 parent 6af57fc commit 664c060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/code/LocalServerApiCalls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private FindResults FindNameHelper(string packageName, string[] tags, bool inclu
string actualPkgName = packageName;

// this regex pattern matches packageName followed by a version (4 digit or 3 with prerelease word)
string regexPattern = $"{packageName}" + @".\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+|.\d)?.nupkg";
string regexPattern = $"{packageName}" + @".\d+\.\d+\.\d+(?:[a-zA-Z0-9-.]+|.\d)?.nupkg";
Regex rx = new Regex(regexPattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
_cmdletPassedIn.WriteDebug($"package file name pattern to be searched for is: {regexPattern}");

Expand Down

0 comments on commit 664c060

Please sign in to comment.