Skip to content

Commit

Permalink
fix(NuGetServer): after installing a package from a NuGet server ther…
Browse files Browse the repository at this point in the history
…e is an exception if the package is not located on the first NuGet repository
  • Loading branch information
iadonkey committed Oct 22, 2024
1 parent 0a2ec3b commit 09fffd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TwinpackCore/Protocol/Nuget/NugetServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public virtual async Task<PackageVersionGetResponse> GetPackageVersionAsync(PlcL
IPackageSearchMetadata x = library.Version == null ? packages.FirstOrDefault() : packages.FirstOrDefault(p => p.Identity.Version.Version.ToString() == library.Version);

if (x == null)
throw new Exceptions.LibraryNotFoundException(library.Name, library.Version, $"Package {library.Name} {library.Version} (distributor: {library.DistributorName}) not found!");
return new PackageVersionGetResponse();

if (!x.Tags?.ToLower().Contains("library") == true && !x.Tags?.ToLower().Contains("plc-library") == true)
throw new Exceptions.LibraryFileInvalidException($"Package {library.Name} {library.Version} (distributor: {library.DistributorName}) does not have a 'plc-library' or 'library' tag!");
Expand Down

0 comments on commit 09fffd2

Please sign in to comment.