Skip to content

Commit 779d03b

Browse files
committed
Fix package ID length adjustment logic in Get-BcNuGetPackageId function
1 parent c955c92 commit 779d03b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NuGet/Get-BcNuGetPackageId.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function Get-BcNuGetPackageId {
4949
# Max. Length of NuGet Package Id is 100 - we shorten the name part of the id if it is too long
5050
$packageId = $packageIdTemplate.replace('{name}',$nname)
5151
if ($packageId.Length -gt 100) {
52-
if ($nname.Length -gt ($packageId.Length - 99)) {
53-
$nname = $nname.Substring(0, $nname.Length - ($packageId.Length - 99))
52+
if ($nname.Length -gt ($packageId.Length - 100)) {
53+
$nname = $nname.Substring(0, $nname.Length - ($packageId.Length - 100))
5454
}
5555
else {
5656
throw "Package id is too long: $packageId, unable to shorten it"

0 commit comments

Comments
 (0)