Skip to content

Commit

Permalink
add situation with no version specified
Browse files Browse the repository at this point in the history
  • Loading branch information
JL03-Yue committed Nov 7, 2023
1 parent 6c74ad6 commit 774234d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,11 @@ await Task.WhenAll(

private string GenerateVersionRangeErrorDescription(string packageIdentifier, VersionRange versionRange)
{
if(versionRange.HasLowerAndUpperBounds && versionRange.MinVersion == versionRange.MaxVersion)
if (!string.IsNullOrEmpty(versionRange.OriginalString) && versionRange.OriginalString == "*")
{
return $"{packageIdentifier}";
}
else if(versionRange.HasLowerAndUpperBounds && versionRange.MinVersion == versionRange.MaxVersion)
{
return $"Version {versionRange.MinVersion} of package {packageIdentifier}";
}
Expand Down

0 comments on commit 774234d

Please sign in to comment.