Skip to content

Commit

Permalink
Fix a bug in the deprecation decorator, update the screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
nkolev92 committed Sep 12, 2023
1 parent 4d09719 commit 9c92b7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified resources/DependencyGraphExample.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/Common/DeprecationInfoDecorator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task DecorateAsync(PackageDependencyNode dependencyNode, Cancellati
return;
}

if (_packageMetadataResourcesAcquired)
if (!_packageMetadataResourcesAcquired)
{
await InitializeMetadataResource(cancellationToken);
_packageMetadataResourcesAcquired = true;
Expand Down Expand Up @@ -60,7 +60,11 @@ private async Task<bool> IsPackageDeprecatedAsync(PackageIdentity packageIdentit
{
if (result?.Result != null)
{
isDeprecated = isDeprecated || await result.Result.GetDeprecationMetadataAsync() != null;
if (!isDeprecated)
{
var deprecationMetadata = await result.Result.GetDeprecationMetadataAsync();
isDeprecated = isDeprecated || deprecationMetadata != null;
}
}
}

Expand Down

0 comments on commit 9c92b7f

Please sign in to comment.